import { create } from 'zustand'
import { persist } from 'zustand/middleware'

// popupMode: 'all' | 'manager_only' | 'never'
// persistentPopup: boolean — if false, auto-dismiss after 3s and mark read on delivery

const useNotificationSettingsStore = create(
  persist(
    (set) => ({
      popupMode: 'all',
      persistentPopup: true,

      setPopupMode: (popupMode) => set({ popupMode }),
      setPersistentPopup: (persistentPopup) => set({ persistentPopup }),
    }),
    { name: 'notification-settings' }
  )
)

export default useNotificationSettingsStore
