
enum PageIcon: String, CaseIterable {

    // MARK: General

    case calendar

    case clockFill = "clock-fill"

    case file

    case globe

    case location

    case poster

    case video

    // MARK: Statistics

    case statisticsTime = "time"

    case statisticsElevationUp = "elevation-up"

    case statisticsElevationDown = "elevation-down"

    case statisticsDistance = "distance"

    case statisticsEnergy = "energy"

    // MARK: Buttons

    case buttonDownload = "download"

    case buttonExternalLink = "external"

    case buttonGitLink = "git"

    case buttonPlay = "play-circle"

    // MARK: Audio player

    case audioPlayerPlaylist = "playlist"

    case audioPlayerClose = "close"

    case audioPlayerPlay = "play"

    case audioPlayerPause = "pause"

    case audioPlayerPrevious = "previous"

    case audioPlayerNext = "next"

    // MARK: Image compare

    case leftRightArrow = "left-right-arrow"

    var icon: ContentIcon.Type {
        switch self {
        case .statisticsTime: return StatisticsTimeIcon.self
        case .statisticsElevationUp: return StatisticsElevationUpIcon.self
        case .statisticsElevationDown: return StatisticsElevationDownIcon.self
        case .statisticsDistance: return StatisticsDistanceIcon.self
        case .statisticsEnergy: return StatisticsEnergyIcon.self
        case .buttonDownload: return Icon.ArrowDown.self
        case .buttonExternalLink: return Icon.ArrowRight.self
        case .buttonGitLink: return Icon.Git.self
        case .buttonPlay: return Icon.Play.self
        case .audioPlayerPlaylist: return AudioPlayerPlaylistIcon.self
        case .audioPlayerClose: return AudioPlayerCloseIcon.self
        case .audioPlayerPlay: return AudioPlayerPlayIcon.self
        case .audioPlayerPause: return AudioPlayerPauseIcon.self
        case .audioPlayerPrevious: return AudioPlayerPreviousIcon.self
        case .audioPlayerNext: return AudioPlayerNextIcon.self
        case .calendar: return Icon.Calendar.self
        case .clockFill: return Icon.ClockFill.self
        case .file: return Icon.File.self
        case .globe: return Icon.Globe.self
        case .location: return Icon.Location.self
        case .poster: return Icon.Poster.self
        case .video: return Icon.Video.self
        case .leftRightArrow:return Icon.LeftRightArrow.self
        }
    }

    var svgString: String {
        icon.content
    }

    var name: String {
        icon.name
    }
}

extension PageIcon: Hashable {
    
}
