import { SetStateAction } from "react"; type Action = "ADD" | "EDIT" | "DELETE"; type Params = { initialData: T; canAdd: boolean; canEdit: boolean; canDelete: boolean; onActionDenied: (deniedAction: Action) => void; emptyOnReset?: boolean; }; declare function useCrudState(options?: Partial>): { state: TData | undefined; dispatch: { ADD: (data?: SetStateAction) => void; EDIT: (data?: SetStateAction) => void; DELETE: (data?: SetStateAction) => void; RESET: () => void; }; is: { ADDING: boolean; EDITING: boolean; DELETING: boolean; }; }; export default useCrudState;