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 PresenceSensorHelperFunctions {
  static List<SceneStaticFunction> tabToRunPresenceSensorFunctions(
      String deviceId, String deviceName, functionValue) {
    return [
      SceneStaticFunction(
        deviceType: 'CPS',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsSensitivityFunction,
        operationName: 'Sensitivity',
        code: 'sensitivity',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.listOfOptions,
        operationalValues: [
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 1,
            description: 1.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 2,
            description: 2.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 3,
            description: 3.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 4,
            description: 4.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 5,
            description: 5.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 6,
            description: 6.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 7,
            description: 7.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 8,
            description: 8.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 9,
            description: 9.toString(),
          ),
          SceneOperationalValue(
            icon: Assets.assetsSensitivityOperationIcon,
            value: 10,
            description: 10.toString(),
          ),
        ],
      ),
    ];
  }

  static List<SceneStaticFunction> automationPresenceSensorFunctions(
      String deviceId, String deviceName, functionValue) {
    return [
      SceneStaticFunction(
        deviceType: 'CPS',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsIconsSensors,
        operationName: 'Presence Status',
        code: 'presence_state',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.listOfOptions,
        operationalValues: [
          SceneOperationalValue(
            icon: Assets.assetsIconsPresenceSensorAssetsEmpty,
            value: 'none',
            description: 'None',
          ),
          // SceneOperationalValue(
          //   icon: Assets.assetsPresence,
          //   value: 'presence',
          //   description: 'Presence',
          // ),
          // SceneOperationalValue(
          //   icon: Assets.assetsMotion,
          //   value: 'motion',
          //   description: 'Motion',
          // ),
        ],
      ),
      SceneStaticFunction(
        deviceType: 'CPS',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsSensitivityFunction,
        operationName: 'Sensitivity',
        code: 'sensitivity',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.integerSteps,
        operationalValues: [
          SceneOperationalValue(
            icon: '',
            description: "",
            value: 0.0,
            minValue: 0,
            maxValue: 10,
            stepValue: 1,
          ),
        ],
      ),
      SceneStaticFunction(
        deviceType: 'CPS',
        deviceId: deviceId,
        deviceName: deviceName,
        icon: Assets.assetsSelfTestResult,
        operationName: 'Self-Test Result',
        code: 'checking_result',
        functionValue: functionValue,
        operationDialogType: OperationDialogType.listOfOptions,
        operationalValues: [
          SceneOperationalValue(
            icon: Assets.assetsSelfTestResult,
            value: 'check_success',
            description: 'Self Testing Success',
          ),
        ],
      ),
    ];
  }
}
