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

import SwiftUI

/// View for selecting snooze duration
struct SnoozeSelectionView: View {
    @Binding var snoozeDuration: Int
    @Environment(\.dismiss) private var dismiss
    
    private let snoozeOptions = [5, 9, 10, 15, 20, 30]
    
    var body: some View {
        List {
            Section("Snooze Duration") {
                ForEach(snoozeOptions, id: \.self) { duration in
                    HStack {
                        Text("\(duration) minutes")
                        Spacer()
                        if snoozeDuration == duration {
                            Image(systemName: "checkmark")
                                .foregroundColor(AppAccent.primary)
                        }
                    }
                    .contentShape(Rectangle())
                    .onTapGesture {
                        snoozeDuration = duration
                    }
                }
            }
        }
        .navigationTitle("Snooze")
        .navigationBarTitleDisplayMode(.inline)
    }
}
