@@ -10,7 +10,7 @@ struct PointOfSaleSettingsHardwareDetailView: View {
1010
1111 var body : some View {
1212 NavigationStack ( path: $navigationPath) {
13- List ( PointOfSaleSettingsView . HardwareDestination. allCases) { destination in
13+ List ( HardwareDestination . allCases) { destination in
1414 NavigationLink ( value: NavigationDestination . hardware ( destination) ) {
1515 HStack ( alignment: . firstTextBaseline) {
1616 Image ( systemName: destination. icon)
@@ -145,8 +145,42 @@ struct PointOfSaleSettingsHardwareDetailView: View {
145145}
146146
147147extension PointOfSaleSettingsHardwareDetailView {
148+ enum HardwareDestination : Identifiable , CaseIterable {
149+ case cardReaders
150+ case scanners
151+
152+ var id : Self { self }
153+
154+ var title : String {
155+ switch self {
156+ case . cardReaders:
157+ return Localization . hardwareNavigationCardReaderTitle
158+ case . scanners:
159+ return Localization . hardwareNavigationBarcodeTitle
160+ }
161+ }
162+
163+ var subtitle : String {
164+ switch self {
165+ case . cardReaders:
166+ return Localization . hardwareNavigationCardReaderSubtitle
167+ case . scanners:
168+ return Localization . hardwareNavigationBarcodeSubtitle
169+ }
170+ }
171+
172+ var icon : String {
173+ switch self {
174+ case . cardReaders:
175+ return " creditcard "
176+ case . scanners:
177+ return " qrcode.viewfinder "
178+ }
179+ }
180+ }
181+
148182 enum NavigationDestination : Hashable {
149- case hardware( PointOfSaleSettingsView . HardwareDestination )
183+ case hardware( HardwareDestination )
150184 }
151185
152186 enum ScannerDestination : Identifiable , CaseIterable {
@@ -257,5 +291,29 @@ private extension PointOfSaleSettingsHardwareDetailView {
257291 value: " Learn more about accepting mobile payments " ,
258292 comment: " Subtitle describing card reader documentation in Point of Sale settings. "
259293 )
294+
295+ static let hardwareNavigationBarcodeTitle = NSLocalizedString (
296+ " pointOfSaleSettingsHardwareDetailView.hardwareNavigationBarcodeTitle " ,
297+ value: " Barcode scanners " ,
298+ comment: " Navigation title of Barcode scanner settings. "
299+ )
300+
301+ static let hardwareNavigationCardReaderTitle = NSLocalizedString (
302+ " pointOfSaleSettingsHardwareDetailView.hardwareNavigationCardReaderTitle " ,
303+ value: " Card readers " ,
304+ comment: " Navigation title of Card reader settings. "
305+ )
306+
307+ static let hardwareNavigationCardReaderSubtitle = NSLocalizedString (
308+ " pointOfSaleSettingsHardwareDetailView.hardwareNavigationCardReaderSubtitle " ,
309+ value: " Manage card reader connections " ,
310+ comment: " Description of Card reader settings for connections. "
311+ )
312+
313+ static let hardwareNavigationBarcodeSubtitle = NSLocalizedString (
314+ " pointOfSaleSettingsHardwareDetailView.hardwareNavigationBarcodeSubtitle " ,
315+ value: " Configure barcode scanner settings " ,
316+ comment: " Description of Barcode scanner settings configuration. "
317+ )
260318 }
261319}
0 commit comments