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 GatewayHelperFunctions {
  static List<SceneStaticFunction> tabToRunGatewayFunctions(
      String deviceId, String deviceName, functionValue) {
    return [
      SceneStaticFunction(
        deviceType: 'GW',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsSwitchAlarmSound,
        operationName: 'Switch Alarm Sound',
        code: 'switch_alarm_sound',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsAcPower, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
        ],
      ),
      SceneStaticFunction(
        deviceType: 'GW',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsMasterState,
        operationName: 'Master State',
        code: 'master_state',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.listOfOptions,
        operationalValues: [
          SceneOperationalValue(
            icon: Assets.assetsAcPower,
            description: "Alarm",
            value: 'alarm',
          ),
          SceneOperationalValue(
            icon: Assets.assetsAcPowerOFF,
            description: "Normal",
            value: 'normal',
          ),
        ],
      ),
      SceneStaticFunction(
        deviceType: 'GW',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsFactoryReset,
        operationName: 'Factory Reset',
        code: 'factory_reset',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.onOff,
        operationalValues: [
          SceneOperationalValue(
              icon: Assets.assetsSceneRefresh, description: "ON", value: true),
          SceneOperationalValue(
              icon: Assets.assetsResetOff, description: "OFF", value: false),
        ],
      ),
    ];
  }
}
