// stores/useChooseStore.ts
import { create } from "zustand";
import { IBid } from "../../system/type";

interface ChoosesStore {
  chooses: IBid[];
  setChooses: (items: IBid[]) => void;
  addChoose: (item: IBid) => void;
}

export const useChoosesStore = create<ChoosesStore>((set) => ({
  chooses: [],
  setChooses: (items) => set({ chooses: items }),
  addChoose: (item) =>
    set((state) => ({
      chooses: [...state.chooses, item],
    })),
}));
