import { DisplayCard } from '../../../../definitions/cards';
import { BuilderSchema } from '../../../../stores/formBuilderStore';
/** A single item inside a `CustomElementGroup.elements` array. */
export interface CustomElementItem {
    /** Dot-notation element type, e.g. `"input.text"`. */
    type: string;
    /** Default `name` (form-data key) applied when the element is added. */
    name?: string;
    /** Display label shown in the palette and pre-filled on the element. */
    label: string;
    /** Lucide icon name (kebab-case or PascalCase), e.g. `"users"`, `"ArrowRight"`. */
    icon: string;
    /** Extra properties merged onto the element when it is added to the form. */
    config?: Record<string, unknown>;
}
/** A collapsible group in `customElementList`. */
export interface CustomElementGroup {
    type: "element-group";
    label: string;
    elements: CustomElementItem[];
}
/** Union of items accepted by the `customElementList` prop. */
export type CustomElementListItem = CustomElementGroup | CustomElementItem;
/**
 * A recommended field surfaced in the "Suggested fields" sidebar. Adding
 * one pre-fills the new element's `name`, `label`, and `defaultValue`.
 */
export interface SuggestedField {
    /** Dot-notation element type, e.g. `"input.text"`. */
    type: string;
    /** Form-data key. Watched against existing form fields to mute duplicates. */
    name: string;
    /** Display label shown in the list and pre-filled on the element. */
    label: string;
    /** Default value pre-filled on the element. */
    defaultValue?: unknown;
}
/**
 * One alternate "card list" the builder can switch to editing. Mirrors the
 * legacy `advancedCardLists` shape: the entry's KEY is also the root card's
 * id in the schema. `style: "tab-container"` (or `cardType: "tab-list"`)
 * makes it a tabbed root; otherwise it's a flat element list.
 */
export interface AdvancedCardListConfig {
    /** Label shown in the switcher select. */
    label: string;
    /** Explicit builder root type. Overrides the `type`/`style` inference. */
    cardType?: DisplayCard["cardType"];
    /** Legacy hint (`"card-list"`, `"tab-list"`, …) — mapped to a `cardType`. */
    type?: string;
    /** Legacy hint (`"tab-container"`, …) — `tab-container` ⇒ a tabbed root. */
    style?: string;
}
export interface FormBuilderProps {
    /** Initial / current schema. Two-way bindable via v-model. */
    modelValue?: BuilderSchema;
    /**
     * Identifier used to key the formBuilderStore. Defaults to a stable
     * auto-generated id so multiple FormBuilders on the same page don't
     * collide.
     */
    builderId?: string;
    label?: string;
    name?: string | null;
    item?: Record<string, unknown>;
    classList?: string[] | string;
    /**
     * Dot-notation element types to exclude from the palette, e.g.
     * `["input.text", "display.heading-1", "code.json"]`. Categories that have
     * no visible styles after filtering are hidden entirely.
     */
    hideElementTypes?: string[];
    /**
     * When provided, replaces the default element palette with a custom list.
     * Each top-level item is either a collapsible `element-group` or a bare
     * element entry. Groups have their own expand/collapse toggle. Bare entries
     * are rendered as flat buttons.
     */
    customElementList?: CustomElementListItem[];
    /**
     * Recommended fields. When non-empty, a "Suggested fields" nav button
     * (magic-wand icon) appears after the layout/tree button. Its column
     * lists each field; adding one pre-fills name/label/defaultValue.
     * Fields whose `name` is not yet in the form sort alphabetically at the
     * top; fields already present are muted and pushed to the bottom.
     */
    suggestedFields?: SuggestedField[];
    /**
     * When `true`, palette items show a drag handle instead of a click-to-add
     * button. The user must drag an item from the palette onto the canvas to
     * add it at the desired position. Defaults to `false`.
     */
    dragToAdd?: boolean;
    /**
     * When `true`, all palette sections are expanded on load. Defaults to `false`.
     */
    openAllSections?: boolean;
    /**
     * Caps the overall builder height so each column (palette, canvas,
     * inspector) scrolls independently instead of the whole component
     * growing with its tallest column. Any CSS length. Defaults to
     * `"40rem"`; pass `"none"` to disable the cap.
     */
    maxHeight?: string;
    /**
     * When `true`, the root container is a tab-list rather than a flat
     * element list. A chrome bar across the top renders one button per tab
     * (with an optional icon) plus a `+` to add tabs; the canvas edits the
     * active tab's element list. Defaults to `false` (flat element list).
     */
    rootTabsContainer?: boolean;
    /**
     * Alternate card lists the builder can switch between, keyed by name (the
     * key doubles as the root card's id, e.g. `"settings"`, `"formTemplate"`).
     * When provided, a switcher nav button (list icon) appears; its column has
     * a select listing the main form plus each advanced list. Switching
     * re-points the canvas / tree / inspector at the chosen root.
     */
    advancedCardLists?: Record<string, AdvancedCardListConfig>;
    /** Label for the main (default) root in the switcher. Defaults to "Form". */
    rootCardListLabel?: string;
    /**
     * When `true`, the builder does NOT render its own card-list switcher (the
     * nav button) or the "Currently editing" banner. Instead the active card is
     * driven externally via `activeAdvancedCard`. Defaults to `false`.
     */
    externalAdvancedCardControl?: boolean;
    /**
     * Externally-controlled active advanced card key. Only consulted when
     * `externalAdvancedCardControl` is `true`: when it matches a key in
     * `advancedCardLists` that card becomes the active root; any other value
     * (or `undefined`) falls back to the main form root.
     */
    activeAdvancedCard?: string;
    /**
     * When `true`, enables snippets: a nav button opens a panel listing the
     * reusable fragments on `modelValue.snippets`, a "Snippets" palette section
     * lets you drag/click them into the form, and a "Convert to snippet" action
     * appears on the selected element. Defaults to `false`.
     */
    enableSnippets?: boolean;
}
type __VLS_Props = FormBuilderProps;
type __VLS_PublicProps = {
    "modelValue"?: BuilderSchema | undefined;
} & __VLS_Props;
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
    "update:modelValue": (value: BuilderSchema | undefined) => any;
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
    "onUpdate:modelValue"?: ((value: BuilderSchema | undefined) => any) | undefined;
}>, {
    item: Record<string, unknown>;
    maxHeight: string;
    rootCardListLabel: string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
    canvasEl: HTMLDivElement;
}, HTMLDivElement>;
export default _default;
//# sourceMappingURL=FormBuilder.vue.d.ts.map