//
//  AdaptiveTabBarPresentation.swift
//  USB Meter
//
//  Created by Codex on 22/04/2026.
//

import SwiftUI

struct AdaptiveTabBarPresentation: Equatable {
    let showsTitles: Bool
    let maxWidth: CGFloat

    static func standard(for size: CGSize) -> AdaptiveTabBarPresentation {
        let compact = min(size.width, size.height)

        if compact < 700 {
            return AdaptiveTabBarPresentation(
                showsTitles: false,
                maxWidth: 340
            )
        }

        return AdaptiveTabBarPresentation(
            showsTitles: true,
            maxWidth: min(size.width - 32, 680)
        )
    }
}
