//
//  AlarmFormView.swift
//  LeCountdown
//
//  Created by Laurent Morvillier on 01/02/2023.
//

import SwiftUI

struct AlarmFormView: View {
    
    var dateBinding: Binding<Date>
    
    var imageBinding: Binding<CoolPic>
    var soundBinding: Binding<Sound>
    var repeatsBinding: Binding<Bool>
    
    var body: some View {
        
        Form {
            DatePicker("Time", selection: dateBinding, displayedComponents: .hourAndMinute)
            SoundImageFormView(imageBinding: imageBinding, soundBinding: soundBinding, repeatsBinding: nil)
        }
    }
}

struct AlarmFormView_Previews: PreviewProvider {
    static var previews: some View {
        AlarmFormView(dateBinding: .constant(Date()),
                      imageBinding: .constant(.pic1), soundBinding: .constant(.trainhorn), repeatsBinding: .constant(true))
    }
}
