struct ContentView: View {
   @Environment(ApplicationData.self) private var appData
   @State private var presentInspector: Bool = false

   var body: some View {
      NavigationStack {
         List(appData.userData) { book in
            CellBook(book: book)
         }
         .navigationTitle(Text("Books"))
         .toolbarTitleDisplayMode(.inlineLarge)
         .inspector(isPresented: $presentInspector) {
            InspectorView()
         }
         .toolbar {
            Button(action: {
               presentInspector.toggle()
            }, label: {
               Image(systemName: presentInspector ? "xmark.circle" : "info.circle")
            })
         }
      }
   }
}