package com.flagship.abox.manager.domain

@JvmInline
value class ProviderProfileId(val value: String)

@JvmInline
value class DeviceId(val value: String)

@JvmInline
value class DeviceName(val value: String)

@JvmInline
value class Username(val value: String)

@JvmInline
value class Password(val value: String) {
    override fun toString(): String = "Password(***)"
}

enum class ProviderType {
    ABOX,
    COMPATIBLE_BACKEND,
    LOCAL_EXPERIENCE,
}

data class ProviderProfile(
    val id: ProviderProfileId,
    val type: ProviderType,
    val displayName: String,
)

enum class DeviceType {
    SOCKET,
    TEMPERATURE_HUMIDITY,
    INFRARED,
}

data class DeviceDescriptor(
    val id: DeviceId,
    val profileId: ProviderProfileId,
    val name: DeviceName,
    val type: DeviceType,
)

data class LoginCredentials(
    val username: Username,
    val password: Password,
)

data class Session(
    val profileId: ProviderProfileId,
    val username: Username,
)

enum class SessionValidity {
    VALID,
    INVALID,
}

enum class SocketPowerState {
    OFF,
    ON,
}

data class SocketStatus(
    val profileId: ProviderProfileId,
    val deviceName: DeviceName,
    val powerState: SocketPowerState,
)

data class TemperatureHumidityReading(
    val profileId: ProviderProfileId,
    val deviceName: DeviceName,
    val temperature: String,
    val humidity: String,
)

data class InfraredCode(
    val deviceName: DeviceName,
    val key: String,
    val code: String,
)

data class InfraredCodeDownloadResult(
    val infraredCode: InfraredCode,
    val successful: Boolean,
)
