//
//  SetValueView.swift
//  SIIMpaPrinterSample
//

import SwiftUI

struct SetValueView: View {
    @Environment(\.dismiss) var dismiss
    @ObservedObject var printerViewModel: PrinterViewModel
    @Binding var value: String
    var body: some View {
        List {
            Section(printerViewModel.valueTable.title) {
                ForEach(printerViewModel.valueTable.valueTable, id: \.self) { item in
                    Button(item) {
                        value = item
                        dismiss()
                    }
                }
            }
        }
        .listStyle(.plain)
        .navigationBarTitle("", displayMode: .inline)
    }
}
