import 'package:syncrow_web/pages/routines/models/gang_switches/base_switch_function.dart';
import 'package:syncrow_web/pages/routines/models/gang_switches/switch_operational_value.dart';
import 'package:syncrow_web/utils/constants/assets.dart';

class DelayFunction extends BaseSwitchFunction {
  DelayFunction({required super.deviceId, required super.deviceName})
      : super(
          code: 'delay',
          operationName: 'Delay',
          icon: Assets.delay,
        );

  @override
  List<SwitchOperationalValue> getOperationalValues() => [
        SwitchOperationalValue(
          icon: '',
          description: "Duration in seconds",
          value: 0.0,
          minValue: 0,
          maxValue: 43200,
          stepValue: 1,
        ),
      ];

  int convertToSeconds(int hours, int minutes) {
    return (hours * 3600) + (minutes * 60);
  }
}
