import type { MutableRefObject } from 'react';
import type { UseFormReturn } from 'react-hook-form';
import type { ToolbarState } from '../../content-model/src/index';
export type DraftWorkflowStatus = 'idle' | 'saving' | 'success' | 'error';
export type MetadataKindConfig = {
    hasRoute: boolean;
    storage: string;
};
export type MetadataAutosaveConfig<TEntry, TValues extends Record<string, unknown>, TMetadataPayload extends Record<string, unknown>> = {
    skipInitialRef: MutableRefObject<boolean>;
    shouldSkipAutoSave: (values: TValues) => boolean;
    buildSavePayload: (values: TValues) => TMetadataPayload;
    saveMetadata: (payload: TMetadataPayload) => Promise<TEntry>;
    onEntrySaved: (entry: TEntry) => void;
    setErrorMessage: (message: string | null) => void;
    setStatus?: (status: DraftWorkflowStatus) => void;
    setLastSavedAt?: (timestamp: string | null) => void;
    form: UseFormReturn<TValues>;
    metadataKind: MetadataKindConfig;
    getBaseline: () => TValues;
    getValues: () => TValues;
    delay: number;
};
export type ContentEntryControllerOptions = {
    autoSaveDelay?: number;
};
export type ContentEntryControllerState<TEntry, TValues extends Record<string, unknown>, TMetadataPayload extends Record<string, unknown> = Record<string, unknown>> = {
    entry: TEntry;
    values: TValues;
    baseline: TValues;
    form: import('react-hook-form').UseFormReturn<TValues>;
    errorMessage: string | null;
    toolbar: ToolbarState<TValues>;
    setErrorMessage: (message: string | null) => void;
    metadataAutosave?: MetadataAutosaveConfig<TEntry, TValues, TMetadataPayload>;
    actions: {
        publish: (options?: {
            mode?: 'default' | 'now';
        }) => Promise<void>;
        discardDraft: () => Promise<void>;
        deleteEntry: () => Promise<void>;
    };
};
export type { ContentEntryDefinition, ContentEntrySnapshot, ToolbarState, } from '../../content-model/src/index';
