'use client';

import { create } from 'zustand';
import { devtools } from 'zustand/middleware';
import {
  createClosingTabSlice,
  ClosingTabSlice,
} from '@/stores/closing/slices/closing-tab.slice';

export type ClosingTabStore = ClosingTabSlice;

export const useClosingTabStore = create<ClosingTabStore>()(
  devtools(
    (...args) => ({
      ...createClosingTabSlice(...args),
    }),
    {
      name: 'ClosingTabStore',
    }
  )
);
