import 'package:syncrow_web/pages/device_managment/curtain/model/curtain_model.dart';
import 'package:syncrow_web/pages/routines/models/curtain/curtain_opertion_value.dart';
import 'package:syncrow_web/pages/routines/models/device_functions.dart'
    show DeviceFunction;
import 'package:syncrow_web/utils/constants/app_enum.dart';
import 'package:syncrow_web/utils/constants/assets.dart';

abstract class CurtainFunction extends DeviceFunction<CurtainModel> {
  final String type;
  CurtainFunction({
    required super.deviceId,
    required super.deviceName,
    required this.type,
    required super.code,
    required super.operationName,
    required super.icon,
  });
  List<CurtainOperationalValue> getOperationalValues();
}

class ControlCurtainFunction extends CurtainFunction {
  ControlCurtainFunction({
    required super.deviceId,
    required super.deviceName,
    required super.type,
    super.code = 'control',
    super.operationName = 'Control',
    super.icon = Assets.curtain,
  });

  @override
  List<CurtainOperationalValue> getOperationalValues() => [
        CurtainOperationalValue(
          icon: Assets.curtain,
          description: 'OPEN',
          value: 'open',
        ),
        CurtainOperationalValue(
          icon: Assets.curtain,
          description: 'STOP',
          value: 'stop',
        ),
        CurtainOperationalValue(
          icon: Assets.curtain,
          description: 'CLOSE',
          value: 'close',
        )
      ];
}
