//
//  KeepAwakePromptState.swift
//  TheNoiseClock
//
//  Created by Matt Bruce on 2/2/26.
//

import Foundation
import Observation

@Observable
class KeepAwakePromptState {
    
    var isPresented = false
    private var hasShownThisSession = false
    
    func showIfNeeded(isKeepAwakeEnabled: Bool) {
        guard !isKeepAwakeEnabled, !hasShownThisSession else { return }
        isPresented = true
        hasShownThisSession = true
    }
    
    func dismiss() {
        isPresented = false
    }
    
    func resetSessionFlag() {
        hasShownThisSession = false
    }
}
