'use client';

import { create } from 'zustand';
import { devtools } from 'zustand/middleware';
import { createChickinApprovalSlice } from '@/stores/production/chickin/slices/chickin-approval.slice';
import { ChickinApprovalSlice } from '@/stores/production/chickin/slices/chickin-approval.slice';
import { createChickinDeleteSlice } from '@/stores/production/chickin/slices/chickin-delete.slice';
import { ChickinDeleteSlice } from '@/stores/production/chickin/slices/chickin-delete.slice';

export type ChickinStore = ChickinApprovalSlice & ChickinDeleteSlice;

export const useChickinStore = create<ChickinStore>()(
  devtools(
    (...args) => ({
      ...createChickinApprovalSlice(...args),
      ...createChickinDeleteSlice(...args),
    }),
    {
      name: 'ChickinStore',
    }
  )
);
