'use client'; import { createContext, useContext, type Dispatch, type SetStateAction } from 'react'; import type { CrewWidgetConfigItem } from '@/types/response/crew/widgetConfig'; export type CrewWidgetConfigContextValue = { items: CrewWidgetConfigItem[]; loading: boolean; saving: boolean; setSaving: Dispatch>; fetchList: () => void; }; export const CrewWidgetConfigContext = createContext({ items: [], loading: true, saving: false, setSaving: () => {}, fetchList: () => {} }); export function useCrewWidgetConfigContext() { return useContext(CrewWidgetConfigContext); }