import UIKit

/// Demo 颜色 / 字体兼容工具：iOS 13+ 使用系统动态值，iOS 11-12 回退静态值。
/// 对齐 OC Demo 的 `DemoBackground()` / `DemoSecondaryBackground()` / `DemoSecondaryLabel()` / `DemoMonoFont()`。
enum DemoCompat {
    static var background: UIColor {
        if #available(iOS 13, *) { return .systemBackground }
        return .white
    }
    static var secondaryBackground: UIColor {
        if #available(iOS 13, *) { return .secondarySystemBackground }
        return UIColor(white: 0.95, alpha: 1)
    }
    static var secondaryLabel: UIColor {
        if #available(iOS 13, *) { return .secondaryLabel }
        return .darkGray
    }
    static var monoFont: UIFont {
        if #available(iOS 13, *) { return .monospacedSystemFont(ofSize: 12, weight: .regular) }
        return UIFont(name: "Menlo", size: 12) ?? .systemFont(ofSize: 12)
    }
}
