/**
 * State for a single ObjectBuilder instance. Multiple ObjectBuilders
 * can coexist on a page; each is keyed by `builderId`.
 *
 * The schema is a flat ordered list of typed key/value entries. The
 * helper `toRecord()` flattens entries into a plain JS object.
 */
export type ObjectBuilderEntryType = "string" | "number" | "boolean" | "array" | "object" | "null";
export interface ObjectBuilderEntry {
    id: string;
    key: string;
    type: ObjectBuilderEntryType;
    value: unknown;
}
export interface ObjectBuilderSchema {
    entries: ObjectBuilderEntry[];
}
/** Identifies which entry is currently selected for editing. */
export interface ObjectBuilderSelection {
    id: string | null;
}
/** Test helper to make ids deterministic. */
export declare function __resetObjectBuilderIdCounter(): void;
/** Sensible default values for each entry type. */
export declare function defaultValueForType(type: ObjectBuilderEntryType): unknown;
/**
 * Normalise a plain `Record<string, unknown>` into an
 * `ObjectBuilderSchema`. Used when consumers pass a raw object via
 * `modelValue`.
 */
export declare function recordToSchema(record: Record<string, unknown>): ObjectBuilderSchema;
/** Flatten an `ObjectBuilderSchema` into a plain JS object. */
export declare function toRecord(schema: ObjectBuilderSchema): Record<string, unknown>;
export declare const useObjectBuilderStore: import('pinia').StoreDefinition<"gx-modui/objectBuilder", Pick<{
    builders: import('vue').Ref<Record<string, ObjectBuilderSchema>, Record<string, ObjectBuilderSchema>>;
    selections: import('vue').Ref<Record<string, ObjectBuilderSelection>, Record<string, ObjectBuilderSelection>>;
    ensureBuilder: (builderId: string) => ObjectBuilderSchema;
    loadSchema: (builderId: string, schema: ObjectBuilderSchema) => void;
    loadRecord: (builderId: string, record: Record<string, unknown>) => void;
    resetBuilder: (builderId: string) => void;
    addEntry: (builderId: string, type: ObjectBuilderEntryType) => string;
    removeEntry: (builderId: string, entryId: string) => void;
    reorderEntry: (builderId: string, fromIndex: number, toIndex: number) => void;
    updateEntry: (builderId: string, entryId: string, patch: Partial<Omit<ObjectBuilderEntry, "id">>) => void;
    select: (builderId: string, id: string | null) => void;
    getSelection: (builderId: string) => ObjectBuilderSelection;
    getSchema: (builderId: string) => ObjectBuilderSchema;
}, "builders" | "selections">, Pick<{
    builders: import('vue').Ref<Record<string, ObjectBuilderSchema>, Record<string, ObjectBuilderSchema>>;
    selections: import('vue').Ref<Record<string, ObjectBuilderSelection>, Record<string, ObjectBuilderSelection>>;
    ensureBuilder: (builderId: string) => ObjectBuilderSchema;
    loadSchema: (builderId: string, schema: ObjectBuilderSchema) => void;
    loadRecord: (builderId: string, record: Record<string, unknown>) => void;
    resetBuilder: (builderId: string) => void;
    addEntry: (builderId: string, type: ObjectBuilderEntryType) => string;
    removeEntry: (builderId: string, entryId: string) => void;
    reorderEntry: (builderId: string, fromIndex: number, toIndex: number) => void;
    updateEntry: (builderId: string, entryId: string, patch: Partial<Omit<ObjectBuilderEntry, "id">>) => void;
    select: (builderId: string, id: string | null) => void;
    getSelection: (builderId: string) => ObjectBuilderSelection;
    getSchema: (builderId: string) => ObjectBuilderSchema;
}, never>, Pick<{
    builders: import('vue').Ref<Record<string, ObjectBuilderSchema>, Record<string, ObjectBuilderSchema>>;
    selections: import('vue').Ref<Record<string, ObjectBuilderSelection>, Record<string, ObjectBuilderSelection>>;
    ensureBuilder: (builderId: string) => ObjectBuilderSchema;
    loadSchema: (builderId: string, schema: ObjectBuilderSchema) => void;
    loadRecord: (builderId: string, record: Record<string, unknown>) => void;
    resetBuilder: (builderId: string) => void;
    addEntry: (builderId: string, type: ObjectBuilderEntryType) => string;
    removeEntry: (builderId: string, entryId: string) => void;
    reorderEntry: (builderId: string, fromIndex: number, toIndex: number) => void;
    updateEntry: (builderId: string, entryId: string, patch: Partial<Omit<ObjectBuilderEntry, "id">>) => void;
    select: (builderId: string, id: string | null) => void;
    getSelection: (builderId: string) => ObjectBuilderSelection;
    getSchema: (builderId: string) => ObjectBuilderSchema;
}, "select" | "ensureBuilder" | "loadSchema" | "resetBuilder" | "getSelection" | "getSchema" | "loadRecord" | "addEntry" | "removeEntry" | "reorderEntry" | "updateEntry">>;
/** Composable wrapper around `useObjectBuilderStore` for one builder. */
export declare function useObjectBuilder(builderId: string): {
    schema: import('vue').ComputedRef<ObjectBuilderSchema>;
    selection: import('vue').ComputedRef<ObjectBuilderSelection>;
    addEntry: (type: ObjectBuilderEntryType) => string;
    removeEntry: (id: string) => void;
    reorderEntry: (from: number, to: number) => void;
    updateEntry: (id: string, patch: Partial<Omit<ObjectBuilderEntry, "id">>) => void;
    select: (id: string | null) => void;
    loadSchema: (schema: ObjectBuilderSchema) => void;
    loadRecord: (record: Record<string, unknown>) => void;
    reset: () => void;
};
//# sourceMappingURL=objectBuilderStore.d.ts.map