import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
import 'package:syncrow_app/generated/assets.dart';

class ThreeGangHelperFunctions {
  static List<SceneStaticFunction> threeGangHelperFunctions(
      String deviceId, String deviceName, functionValue) {
    return [
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsAcPower,
        operationName: 'L - Light Switch',
        code: 'switch_1',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsLightCountdown,
        operationName: 'L - Light Countdown',
        code: 'countdown_1',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.countdown,
        operationalValues: [
          SceneOperationalValue(icon: '', value: 0),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsAcPower,
        operationName: 'M - Light Switch',
        code: 'switch_2',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsLightCountdown,
        operationName: 'M - Light Countdown',
        code: 'countdown_2',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.countdown,
        operationalValues: [
          SceneOperationalValue(icon: '', value: 0),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsAcPower,
        operationName: 'R - Light Switch',
        code: 'switch_3',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsLightCountdown,
        operationName: 'R - Light Countdown',
        code: 'countdown_3',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.countdown,
        operationalValues: [
          SceneOperationalValue(icon: '', value: 0),
        ],
      ),
    ];
  }

  static List<SceneStaticFunction> threeGangAutomationFunctions(
      String deviceId, String deviceName, functionValue) {
    return [
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsAcPower,
        operationName: 'L - Light Switch',
        code: 'switch_1',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsLightCountdown,
        operationName: 'L - Light Countdown',
        code: 'countdown_1',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.integerSteps,
        operationalValues: [
          SceneOperationalValue(
            icon: '',
            description: "sec",
            value: 0.0,
            minValue: 0,
            maxValue: 43200,
            stepValue: 1,
          ),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsAcPower,
        operationName: 'M - Light Switch',
        code: 'switch_2',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsLightCountdown,
        operationName: 'M - Light Countdown',
        code: 'countdown_2',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.integerSteps,
        operationalValues: [
          SceneOperationalValue(
            icon: '',
            description: "sec",
            value: 0.0,
            minValue: 0,
            maxValue: 43200,
            stepValue: 1,
          ),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsAcPower,
        operationName: 'R - Light Switch',
        code: 'switch_3',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: '3G',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsLightCountdown,
        operationName: 'R - Light Countdown',
        code: 'countdown_3',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.integerSteps,
        operationalValues: [
          SceneOperationalValue(
            icon: '',
            description: "sec",
            value: 0.0,
            minValue: 0,
            maxValue: 43200,
            stepValue: 1,
          ),
        ],
      ),
    ];
  }
}
