learning_ai_clock/ios/ChronoMindMac/MenuBarState.swift
saravanakumardb1 d179c4c624 feat(watch,mac): complete watchOS + macOS companion targets
- watchOS: add WatchSessionManager (WCSession bridge), WatchNotificationHandler
  (snooze/dismiss actions), recommendations() for AppIntentTimelineProvider
- watchOS: WatchTimerStore tick loop with cascade haptics, App Group sync
- macOS: CreateTimerSheet (countdown/alarm/pomodoro), launch-at-login toggle
- macOS: MenuBarState showCreateSheet, MacSettingsView data tab
- Xcode project updated with new file references
2026-03-27 11:28:13 -07:00

31 lines
830 B
Swift

// Menu Bar State
// Observable state for the macOS menu bar popover
import SwiftUI
import Combine
@MainActor
final class MenuBarState: ObservableObject {
static let shared = MenuBarState()
@Published var isExpanded = false
@Published var showQuickTimer = false
@Published var showCreateSheet = false
@Published var quickTimerLabel = ""
@Published var quickTimerMinutes: Double = 25
private init() {}
func toggleExpanded() {
withAnimation(.easeInOut(duration: 0.2)) {
isExpanded.toggle()
}
}
func resetQuickTimer() {
quickTimerLabel = ""
quickTimerMinutes = 25
showQuickTimer = false
}
}