Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
folium-app
GitHub Repository: folium-app/Folium
Path: blob/a-new-beginning/Folium-iOS/Enumerations/Feature.swift
2 views
//
//  Feature.swift
//  Folium-iOS
//
//  Created by Jarrod Norwell on 20/11/2025.
//

import Foundation
import UIKit

enum Feature : String {
    static func < (lhs: Feature, rhs: Feature) -> Bool {
        lhs.string.localizedCaseInsensitiveCompare(rhs.string) == .orderedAscending
    }
    
    case audio = "Audio"
    
    case camera = "Camera",
         keyboard = "Keyboard",
         microphone = "Microphone"
    
    case gameControllers = "Game Controllers"
    
    case twoPlayers = "Two Players",
         fourPlayers = "Four Players"
    
    case multiplayer = "Multiplayer",
         saveStates = "Save States"
    
    var image: UIImage? {
        switch self {
        case .audio:
            UIImage(systemName: "speaker.slash")
            
        case .camera:
            UIImage(systemName: "camera")
        case .keyboard:
            UIImage(systemName: "keyboard")
        case .microphone:
            UIImage(systemName: "microphone")
            
        case .gameControllers:
            UIImage(systemName: "gamecontroller")
        case .twoPlayers:
            UIImage(systemName: "circle.grid.2x1")
        case .fourPlayers:
            UIImage(systemName: "circle.grid.2x2")
            
        case .multiplayer:
            UIImage(systemName: "network")
        case .saveStates:
            UIImage(systemName: "square.and.arrow.down")
        }
    }
    
    var string: String { rawValue }
}