import 'package:syncrow_web/utils/constants/assets.dart';

class DeviceIconTypeHelper {
  static const Map<String, String> _iconMap = {
    'AC': Assets.ac,
    'GW': Assets.gateway,
    'CPS': Assets.sensors,
    'DL': Assets.doorLock,
    'WPS': Assets.sensors,
    '3G': Assets.gangSwitch,
    '2G': Assets.twoGang,
    '1G': Assets.oneGang,
    'CUR': Assets.curtain,
    'WH': Assets.waterHeater,
    'DS': Assets.doorSensor,
    '1GT': Assets.oneTouchSwitch,
    '2GT': Assets.twoTouchSwitch,
    '3GT': Assets.threeTouchSwitch,
    'GD': Assets.garageDoor,
    'WL': Assets.waterLeakNormal,
    'NCPS': Assets.sensors,
  };

  static String getDeviceIconByTypeCode(String? typeCode) {
    if (typeCode == null) return Assets.logoHorizontal;
    return _iconMap[typeCode] ?? Assets.logoHorizontal;
  }
}
