//
//  DisplayContext.swift
//  PadelClub
//
//  Created by Razmig Sarkissian on 20/03/2024.
//

import Foundation
import UIKit

enum DisplayContext {
    case addition
    case edition
    case lockedForEditing
    case selection
}

enum DisplayStyle {
    case title
    case wide
    case short
}

enum SummoningDisplayContext {
    case footer
    case menu
}

struct DeviceHelper {
    static func isBigScreen() -> Bool {
        switch UIDevice.current.userInterfaceIdiom {
        case .pad:  // iPads
            return true
        case .phone:  // iPhones (you can add more cases here for large vs small phones)
            if UIScreen.main.bounds.size.width > 375 { // iPhone X, 11, 12, 13 Pro Max etc.
                return true  // large phones
            } else {
                return false  // smaller phones
            }
        default:
            return false  // Other devices (Apple Watch, TV, etc.)
        }

    }
    
    static func maxCharacter() -> Int {
        switch UIDevice.current.userInterfaceIdiom {
        case .pad:  // iPads
            return 30
        case .phone:  // iPhones (you can add more cases here for large vs small phones)
            if UIScreen.main.bounds.size.width > 375 { // iPhone X, 11, 12, 13 Pro Max etc.
                return 15  // large phones
            } else {
                return 9  // smaller phones
            }
        default:
            return 9  // Other devices (Apple Watch, TV, etc.)
        }
    }
    
    static func charLength() -> Int {
        isBigScreen() ? 0 : 15
    }
}
