// The hand before Search: what the core says its tap wears (`shell.deck`'s// `hand_next`), committed as the core said. Which faces a table offers, the// one chosen and the one after it are the core's.importCottonKitimportCottonValuesimportSwiftUIprivatestructFaceChoiceTableKey: EnvironmentKey { staticlet defaultValue: String? = nil }extensionEnvironmentValues {var faceChoiceTable: String? { get { self[FaceChoiceTableKey.self] } set { self[FaceChoiceTableKey.self] = newValue } }}/// The hand on the deck's top row, the circle before Search, where the/// deck's table offers more than one face: a shortcut that cycles them (the/// owner, 3 Nov 2026: "the icon on the top is for cycling"). The opened/// card's Face act keeps the tier.structFaceChoiceControl: View {/// What a tap wears (`shell.deck`'s `hand_next`).let next: DeckAnswer.HandNext @Environment(\.cottonCore) privatevar core @Environment(ToastCenter.self) privatevar toasts: ToastCenter? @State privatevar writing = falsevar body: someView {Button {guardlet core, !writing else { return } writing = trueTask {iflet refusal = awaitDeckEditor.commitRow(next.writes, core: core) { toasts?.show(refusal, tone: .error) } writing = false } } label: { ZStack {Circle().fill(NavChrome.circleFill) .frame(width: NavCircleKnobs.chromeNavCircleDiameter, height: NavCircleKnobs.chromeNavCircleDiameter) .softShadow()FaceHandMark().stroke(lineWidth: 1.4) .foregroundStyle(NavChrome.glyphInk) .frame(width: 24, height: 24) } .frame(width: ScreenBarKnobs.chromeNavCircleTarget, height: ScreenBarKnobs.chromeNavCircleTarget) .contentShape(Rectangle()) } .buttonStyle(MotionButtonStyle()) .disabled(writing) .accessibilityLabel(next.label ?? "") .accessibilityIdentifier("deck-face-choice") }}/// The shell's hand of three cards, in the same line as the head's controls.structFaceHandMark: Shape {func path(in rect: CGRect) -> Path {var path = Path()for angle in [-0.28, 0, 0.28] {let card = Path(roundedRect: CGRect(x: -6, y: -17, width: 12, height: 17), cornerRadius: 1.5) path.addPath(card, transform: CGAffineTransform(rotationAngle: angle) .concatenating(CGAffineTransform(translationX: rect.midX, y: rect.maxY - 2))) }return path }}