import { create } from 'zustand';

interface AddedFlashProduct {
  productId: number;
  product: any;
}

interface FlashCartStore {
  addedFlashProduct: AddedFlashProduct | null;
  setAddedFlashProduct: (product: AddedFlashProduct | null) => void;
  clearAddedFlashProduct: () => void;
}

export const useFlashCartStore = create<FlashCartStore>((set) => ({
  addedFlashProduct: null,
  setAddedFlashProduct: (product) => set({ addedFlashProduct: product }),
  clearAddedFlashProduct: () => set({ addedFlashProduct: null }),
}));
