import Foundation

enum TextureSlotKind: String, CaseIterable, Identifiable, Hashable {
    case baseColor
    case normal
    case occlusion
    case roughness
    case metallic

    var id: String { rawValue }

    var title: String {
        switch self {
        case .baseColor:
            "Base Color"
        case .normal:
            "Normal"
        case .occlusion:
            "Occlusion"
        case .roughness:
            "Roughness / Gloss"
        case .metallic:
            "Metallic"
        }
    }

    var shortTitle: String {
        switch self {
        case .baseColor:
            "Color"
        case .normal:
            "Normal"
        case .occlusion:
            "AO"
        case .roughness:
            "Rough"
        case .metallic:
            "Metal"
        }
    }

    var systemImage: String {
        switch self {
        case .baseColor:
            "paintpalette"
        case .normal:
            "cube.transparent"
        case .occlusion:
            "circle.lefthalf.filled"
        case .roughness:
            "sparkles.rectangle.stack"
        case .metallic:
            "shield.lefthalf.filled"
        }
    }

    var help: String {
        switch self {
        case .baseColor:
            "Unlit albedo/base color. Diffuse maps work as a source, but baked lighting should be reduced when possible."
        case .normal:
            "Tangent-space normal map. Enable Y flip if your source is DirectX-style."
        case .occlusion:
            "Ambient occlusion. Packed into the red channel of the SL/glTF ORM map. Missing AO exports white."
        case .roughness:
            "Roughness grayscale. If your input is gloss/smoothness, enable invert."
        case .metallic:
            "Metallic grayscale. Most fabric, stone, wood, skin, plastic and painted items should stay black."
        }
    }

    var required: Bool {
        self == .baseColor
    }
}
