//
//  ClockOverlayContainer.swift
//  TheNoiseClock
//
//  Created by Matt Bruce on 9/8/25.
//

import SwiftUI
import Bedrock

/// Container component that handles the positioning and display of top overlays
struct ClockOverlayContainer: View {
    
    // MARK: - Properties
    let style: ClockStyle
    
    // MARK: - Body
    var body: some View {
        VStack {
            if style.showBattery || style.showDate {
                TopOverlayView(
                    showBattery: style.showBattery,
                    showDate: style.showDate,
                    color: style.digitColor.opacity(Design.Opacity.heavy),
                    opacity: style.overlayOpacity,
                    dateFormat: style.dateFormat
                )
                .padding(.top, Design.Spacing.small)
                .padding(.horizontal, Design.Spacing.large)
                .transition(.opacity)
            }
            Spacer()
        }
    }
}

// MARK: - Preview
#Preview {
    ClockOverlayContainer(style: ClockStyle())
}
