'use client';

import { ReactNode } from 'react';
import { StateCreator } from 'zustand';
import { UIStore } from '@/types/stores';

type NavbarActionsSlice = {
  navbarActions: ReactNode | null;
  setNavbarActions: (actions: ReactNode) => void;
  clearNavbarActions: () => void;
};

export const createNavbarActionsSlice: StateCreator<
  UIStore,
  [],
  [],
  NavbarActionsSlice
> = (set) => ({
  navbarActions: null,
  setNavbarActions: (actions) => set({ navbarActions: actions }),
  clearNavbarActions: () => set({ navbarActions: null }),
});
