import SwiftUI

struct SettingsView: View {
   @Environment(ApplicationData.self) private var appData

   var body: some View {
      @Bindable var appData = appData

      Form {
         Section(header: Text("Settings"), footer: Text("Select what you want to see")) {
            Toggle("Show Pictures", isOn: $appData.showPictures)
            Toggle("Show Year", isOn: $appData.showYear)
         }
      }
   }
}
#Preview {
   SettingsView()
      .environment(ApplicationData.shared)
}