import { Dispatch, createContext } from 'react'; import { ActionType } from '@/hooks/useCreateReducer'; import { Prompt } from '@/types/prompt'; import { PromptbarInitialState } from './Promptbar.state'; export interface PromptbarContextProps { state: PromptbarInitialState; dispatch: Dispatch>; handleCreatePrompt: () => void; handleDeletePrompt: (prompt: Prompt) => void; handleUpdatePrompt: (prompt: Prompt) => void; } const PromptbarContext = createContext(undefined!); export default PromptbarContext;