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

import SwiftUI

/// Component that handles the clock view toolbar and navigation
struct ClockToolbar: View {
    
    // MARK: - Properties
    let isDisplayMode: Bool
    
    // MARK: - Body
    var body: some View {
        EmptyView()
            .navigationTitle(isDisplayMode ? "" : "Clock")
            .navigationBarBackButtonHidden(isDisplayMode)
            .toolbar(isDisplayMode ? .hidden : .automatic)
    }
}

// MARK: - Preview
#Preview {
    NavigationStack {
        ClockToolbar(
            isDisplayMode: false
        )
    }
}
