// What the tray is doing, and the set of acts it is raised with. import Foundation /// A set of acts the tray is raised with, under a title: one message's acts /// when its bubble is held, a person's channels. struct TrayOffer: Equatable, Identifiable, Sendable { var id: String var title: String var subject: String? = nil var acts: [ActCardReading] } /// What the tray is doing. enum TrayState: Equatable, Sendable { /// Put away: nothing at the page's foot. case rest /// Raised by the stack button: every act, as the lifted list under it. case pulled /// Raised with a set of acts that belong to one thing on the page. case offering(TrayOffer) var isRaised: Bool { self != .rest } /// Drawn as the sheet at the page's foot: one thing's acts. Pulled, the /// page's acts are a lifted list, not a sheet. var isSheet: Bool { self != .rest && self != .pulled } }