import { ProjectFlockSlice } from '@/types/stores';
import { StateCreator } from 'zustand';

export const createProjectFlockSlice: StateCreator<
  ProjectFlockSlice,
  [],
  [],
  ProjectFlockSlice
> = (set) => ({
  // Initial state
  isSuccess: false,
  createdProjectFlock: null,

  // Actions
  setIsSuccess: (success) => set({ isSuccess: success }),

  setCreatedProjectFlock: (data) => set({ createdProjectFlock: data }),

  resetProjectFlock: () =>
    set({
      isSuccess: false,
      createdProjectFlock: null,
    }),
});
