import SwiftUI
import SFSafeSymbols

struct InsertableView<Command>: View where Command: InsertableCommandView  {

    @State
    private var showSheet: Bool = false

    var body: some View {
        Button(action: { showSheet = true }) {
            Label(Command.title, systemSymbol: Command.icon)
        }
        .sheet(isPresented: $showSheet) {
            InsertableCommandSheet<Command>()
        }
    }
}
