import { create } from "zustand"

import { BookingCodeFilterEnum } from "@/types/enums/bookingCodeFilter"

interface BookingCodeFilterState {
  activeCodeFilter: keyof typeof BookingCodeFilterEnum
  setFilter: (filter: BookingCodeFilterEnum) => void
}

export const useBookingCodeFilterStore = create<BookingCodeFilterState>(
  (set) => ({
    activeCodeFilter: BookingCodeFilterEnum.Discounted,
    setFilter: (filter) => set({ activeCodeFilter: filter }),
  })
)
