// Cotton Calling's door into the deck: an app that places calls itself says// so here, and a card's handset and camera place the call through it instead// of handing the number to the phone's own dialler.importCottonValuesimportSwiftUI/// Place a call to a person in this copy: their id, whether it is a video/// call, and where the core's words go when it refuses (no number to call).publictypealiasPlacesCall = @MainActor (_ person: String, _ video: Bool, _ refused: @escaping @MainActor (String) -> Void) -> VoidextensionEnvironmentValues {/// Set by Cotton Calling (`CottonCalls.CallingShell`); nil in every other/// app, whose handset opens the phone's dialler (`ContactHandoff`). @Entry publicvar placesCall: PlacesCall? = nil/// Set by Cotton Calling: a `cottoncalling://call?…` link it takes/// (answers true), so the app's own links never say it opens nothing. @Entry publicvar opensCallLink: (@MainActor (URL) -> Bool)? = nil}enumDeckPlacesCall {/// The person a card calls: a call's own person (`person_id`, a Recents/// slip), else the card's record (a person's card).staticfunc person(of record: TableRecord) -> String {ifcase .text(let person)? = record.values["person_id"], !person.isEmpty { return person }return record.id }}