// What a kind is called.//// A kind wears NO colour (the constitution's rule): identity is a glyph and a// word in quiet ink.importFoundation/// Every kind a badge or a mark can name.////// The first ten are the ROUTED kinds — what filing a thought can produce. The/// rest are kinds the router cannot create but a screen still shows; they will/// never move into the routed table, so they are declared here beside it rather/// than pretending to be routable.publicenumBadgeKind: String, CaseIterable, Sendable {// Routedcase todocase eventcase notecase journalcase personNote = "person_note"case locationcase pagecase transactioncase moodcase sessionMessage = "session_message"// Borrowedcase personcase thoughtcase meetingcase documentcase newsEdition = "news_edition"case photocase videocase secretcase repositorycase pullcase issuecase decisioncase emailThread = "email_thread"/// The kinds filing a thought can produce.publicstaticlet routed: [BadgeKind] = [ .todo, .event, .note, .journal, .personNote, .location, .page, .transaction, .mood, .sessionMessage, ]/// The SF Symbol this kind wears. The phone names a Lucide glyph; the/// nearest system symbol is used here rather than shipping an icon set,/// because the app loads no font and no asset it does not need.publicvar symbol: String {switchself {case .todo: return"checkmark.circle"case .event: return"calendar"case .note: return"note.text"case .journal: return"book"case .personNote: return"person.crop.circle"case .location: return"mappin.and.ellipse"case .page: return"text.book.closed"// A banknote, not one country's currency sign: a money record is in// whatever currency its account holds.case .transaction: return"banknote"case .mood: return"face.smiling"// The paper plane: a message SENT somewhere, which is what the record// is — not an inbox, which would say it arrived here.case .sessionMessage: return"paperplane"case .person: return"person"case .thought: return"tray"case .meeting: return"mic"case .document: return"doc.text"case .newsEdition: return"newspaper"case .photo: return"photo"case .video: return"video"case .secret: return"key"case .repository: return"shippingbox"case .pull: return"arrow.triangle.pull"case .issue: return"exclamationmark.circle"case .decision: return"checkmark.seal"case .emailThread: return"envelope" } }/// What filing PRODUCES, said the way the owner would say it — never the/// table's name. "Person note", not "Person": it writes a note onto a/// person who already exists rather than making a contact out of a/// sentence. "Money", not "Transaction". "Sent to a session", not "Session/// message".publicvar label: String {switchself {case .todo: returnShellLines.line("format", "mark.todo")case .event: returnShellLines.line("format", "mark.event")case .note: returnShellLines.line("format", "mark.note")case .journal: returnShellLines.line("format", "mark.journal")case .personNote: returnShellLines.line("format", "mark.person_note")case .location: returnShellLines.line("format", "mark.location")case .page: returnShellLines.line("format", "mark.page")case .transaction: returnShellLines.line("format", "mark.transaction")case .mood: returnShellLines.line("format", "mark.mood")// The app's one spelling of it, shared with the session screens.case .sessionMessage: returnCottonStrings.sentToASessioncase .person: returnShellLines.line("format", "mark.person")case .thought: returnShellLines.line("format", "mark.thought")case .meeting: returnShellLines.line("format", "mark.meeting")case .document: returnShellLines.line("format", "mark.document")case .newsEdition: returnShellLines.line("format", "mark.news_edition")case .photo: returnShellLines.line("format", "mark.photo")case .video: returnShellLines.line("format", "mark.video")case .secret: returnShellLines.line("format", "mark.secret")case .repository: returnShellLines.line("format", "mark.repository")case .pull: returnShellLines.line("format", "mark.pull")case .issue: returnShellLines.line("format", "mark.issue")case .decision: returnShellLines.line("format", "mark.decision")case .emailThread: returnShellLines.line("format", "mark.email_thread") } }/// What a kind is called when all the screen has is the stored word.////// A kind this build has a label for wears it; one it has not — a kind a/// newer build added — is read out as words rather than drawn as stored.publicstaticfunc label(forKind kind: String) -> String {BadgeKind(rawValue: kind)?.label ?? PlainWords.sentence(kind) ?? "Record" }}