/** These types are shared with Directus */
/** Keep in sync with Directus */
type PrimaryKey = string | number;
type EditConfig$1 = {
    collection: string;
    item: PrimaryKey | null;
    fields?: string[];
    mode?: 'drawer' | 'modal' | 'popover';
};
type SavedData$1 = {
    key: string;
    collection: EditConfig$1['collection'];
    item: EditConfig$1['item'];
    payload: Record<string, any>;
};

type EditConfigStrict = EditConfig$1;
type EditConfig = Omit<EditConfigStrict, 'fields'> & {
    fields?: EditConfigStrict['fields'] | string;
};
type SavedData = SavedData$1;
type EditableElementOptions = {
    customClass?: string | undefined;
    onSaved?: ((data: Omit<SavedData, 'key'>) => void) | undefined;
};

declare function apply({ directusUrl, elements, customClass, onSaved, }: {
    directusUrl: string;
    elements?: HTMLElement | HTMLElement[] | null;
} & EditableElementOptions): Promise<{
    remove(): void;
    enable(): void;
    disable(): void;
} | undefined>;
declare function remove(): void;
declare function disable(): {
    enable(): void;
};
declare function setAttr(editConfig: EditConfig): string;

export { apply, disable, remove, setAttr };
