import Foundation public struct PromptDaySummary: Identifiable, Hashable, Sendable { public var id: String { day } public let day: String public let count: Int public init(day: String, count: Int) { self.day = day self.count = count } } public struct PromptTopicSummary: Identifiable, Hashable, Sendable { public var id: String { guard let topic else { return "untagged" } return "tag:\(topic.folding(options: [.caseInsensitive], locale: Locale(identifier: "en_US_POSIX")).lowercased())" } public let topic: String? public let count: Int public init(topic: String?, count: Int) { self.topic = topic self.count = count } public var displayName: String { topic ?? "Ohne Tags" } public var isUntagged: Bool { topic == nil } } public struct PromptChronologySummary: Sendable { public let days: [PromptDaySummary] public let legacyUndatedCount: Int public init(days: [PromptDaySummary], legacyUndatedCount: Int) { self.days = days self.legacyUndatedCount = legacyUndatedCount } }