import { Screen, Theme } from '@janbox/storefront-ui/theme'; import { SerializedNodes } from '../../types'; import { EditorResources } from '../types'; export type EditorMode = 'full' | 'compact'; export type VariableOption = { label: string; value: string; }; export type VariableDefinition = { label: string; key: string; options: [VariableOption, ...VariableOption[]]; }; export type EditorHandlers = { close: () => void; submit: (abc: SerializedNodes) => void | Promise; upload: (file: File) => string | Promise; saveTheme?: (theme: Theme) => void | Promise; }; export type EditorState = { theme: Theme; handlers: Readonly; screen: Screen; action?: string; variableDefinitions?: VariableDefinition[]; /** Tài nguyên edit-time do consumer cấp. Truyền một lần lúc init, bất biến. */ resources?: EditorResources; }; type MutableEditorState = Pick; type EditorStateValue = EditorState & { setState: (partial: Partial) => void; }; export declare const useEditor: (initialState?: EditorState) => EditorStateValue; export {};