import { create } from 'zustand'

interface AuthModalState {
  isOpen: boolean
  mode: 'login' | 'register'
  open: (mode?: 'login' | 'register') => void
  close: () => void
}

export const useAuthModalStore = create<AuthModalState>((set) => ({
  isOpen: false,
  mode: 'register',
  open: (mode = 'register') => set({ isOpen: true, mode }),
  close: () => set({ isOpen: false }),
}))
