/**
 * Types for HazoTemplateGenerator component
 */
import type { Section, FieldConfig, InputFormat, InputOption } from '../_internal_form_set.js';
import type { DataTableConfig, DataTableColumn } from '../hazo_collab_form_data_table.js';
import type { IconsBehaviour, ControlName, RoleBehaviour, RoleControlBehaviour } from '../../types/icons_behaviour.js';
import { DEFAULT_ICON_ORDER, get_default_icons_behaviour } from '../../types/icons_behaviour.js';
import type { NewFieldDefinition } from '../hazo_add_field_dialog/types.js';
import type { EditorTheme } from '../shared/editor_theme/types.js';
export type { Section, FieldConfig, DataTableConfig, DataTableColumn, InputFormat, InputOption };
export type { IconsBehaviour, ControlName, RoleBehaviour, RoleControlBehaviour };
export { DEFAULT_ICON_ORDER, get_default_icons_behaviour };
/**
 * Form-set data structure (multi-section format)
 * This is the target export format: { sections: [...], icons_behaviour?: {...} }
 */
export interface FormSetData {
    sections: Section[];
    icons_behaviour?: IconsBehaviour;
}
/**
 * All available control names
 */
export declare const ALL_CONTROL_NAMES: ControlName[];
/**
 * Control name labels for display
 */
export declare const CONTROL_NAME_LABELS: Record<ControlName, string>;
/**
 * Component types available for fields
 */
export declare const COMPONENT_TYPES: readonly ["HazoCollabFormInputbox", "HazoCollabFormTextArea", "HazoCollabFormCheckbox", "HazoCollabFormRadio", "HazoCollabFormCombo", "HazoCollabFormDate", "HazoCollabFormDataTable", "HazoCollabFormDoc", "HazoCollabFormCurrency", "HazoCollabFormPercentage", "HazoCollabFormComputed", "HazoCollabFormStaticText", "HazoCollabFormSummaryRow", "HazoCollabFormMasked"];
export type ComponentType = typeof COMPONENT_TYPES[number];
/**
 * Input types for validation
 */
export declare const INPUT_TYPES: readonly ["mixed", "numeric", "email", "alpha"];
export type InputType = typeof INPUT_TYPES[number];
/**
 * Data OK states
 */
export declare const DATA_OK_STATES: readonly ["ok", "not_ok", "pending"];
export type DataOkState = typeof DATA_OK_STATES[number];
/**
 * DataTable field types for columns
 */
export declare const DATA_TABLE_FIELD_TYPES: readonly ["text", "numeric", "dropdown", "files", "checkbox", "radiobutton", "date", "currency", "percentage"];
export type DataTableFieldType = typeof DATA_TABLE_FIELD_TYPES[number];
/**
 * Template option for loading existing templates
 */
export interface TemplateOption {
    id: string;
    name: string;
    description?: string;
}
/**
 * Tree node types for the section tree
 */
export type TreeNodeType = 'section' | 'group' | 'field';
/**
 * Tree node representation for the section tree
 *
 * Path format with multi-section support:
 * - "s0" for section 0
 * - "s0.0" for group 0 in section 0
 * - "s0.0.1" for field 1 in group 0 in section 0
 * - "s0.0.1.2" for field 2 in nested group at s0.0.1
 */
export interface TreeNode {
    id: string;
    type: TreeNodeType;
    label: string;
    field_config?: FieldConfig;
    section?: Section;
    children?: TreeNode[];
    parent_id?: string;
    path: string;
}
/**
 * Selected item in the tree
 */
export interface SelectedItem {
    path: string;
    type: TreeNodeType;
    node: TreeNode;
}
/**
 * History state for undo/redo
 */
export interface HistoryState {
    sections: Section[];
    icons_behaviour?: IconsBehaviour;
    selected_path: string | null;
    timestamp: number;
    action_description?: string;
}
/**
 * Validation error for a field
 */
export interface ValidationError {
    field_path: string;
    field_id: string;
    message: string;
}
/**
 * Context state for the template generator
 */
export interface TemplateGeneratorState {
    sections: Section[];
    icons_behaviour?: IconsBehaviour;
    selected_path: string | null;
    selected_item: SelectedItem | null;
    history: HistoryState[];
    history_index: number;
    can_undo: boolean;
    can_redo: boolean;
    validation_errors: ValidationError[];
    is_preview_open: boolean;
    is_dirty: boolean;
}
/**
 * Context actions for the template generator
 */
export interface TemplateGeneratorActions {
    set_template: (data: Section | FormSetData) => void;
    add_section: (section_name?: string) => void;
    update_section: (section_index: number, updates: Partial<Section>) => void;
    delete_section: (section_index: number) => void;
    move_section: (from_index: number, to_index: number) => void;
    add_field: (parent_path: string | null, field: FieldConfig) => void;
    update_field: (path: string, updates: Partial<FieldConfig>) => void;
    delete_field: (path: string) => void;
    duplicate_field: (path: string) => void;
    move_field: (from_path: string, to_path: string, position: 'before' | 'after' | 'inside') => void;
    add_group: (parent_path: string | null, label: string) => void;
    add_group_with_fields: (parent_path: string | null, label: string, fields: NewFieldDefinition[]) => void;
    select_item: (path: string | null) => void;
    undo: () => void;
    redo: () => void;
    push_history: (action_description?: string) => void;
    validate_template: () => ValidationError[];
    open_preview: () => void;
    close_preview: () => void;
    get_field_by_path: (path: string) => FieldConfig | null;
    get_section_by_index: (index: number) => Section | null;
    get_all_field_ids: () => string[];
    update_icons_behaviour: (updates: Partial<IconsBehaviour>) => void;
    add_role: (role: RoleBehaviour) => void;
    update_role: (role_id: string, updates: Partial<RoleBehaviour>) => void;
    delete_role: (role_id: string) => void;
}
/**
 * Props for HazoTemplateGenerator component
 */
export interface HazoTemplateGeneratorProps {
    initial_template?: Section | FormSetData;
    on_template_change?: (data: FormSetData) => void;
    on_save?: (data: FormSetData) => void;
    on_cancel?: () => void;
    available_templates?: TemplateOption[];
    on_load_template?: (template_id: string) => Promise<Section | FormSetData>;
    preview_chat_group_id?: string;
    show_summary_editor?: boolean;
    readonly?: boolean;
    show_import_export?: boolean;
    show_controls_tab?: boolean;
    theme?: Partial<EditorTheme>;
    className?: string;
}
/**
 * Default empty section
 */
export declare const DEFAULT_SECTION: Section;
/**
 * Default empty template (single section for backwards compatibility)
 */
export declare const DEFAULT_TEMPLATE: Section;
/**
 * Default form-set data (multi-section format)
 */
export declare const DEFAULT_FORM_SET_DATA: FormSetData;
/**
 * Default field configuration
 */
export declare const DEFAULT_FIELD: FieldConfig;
/**
 * Default group configuration
 */
export declare const DEFAULT_GROUP: FieldConfig;
/**
 * Default DataTable column
 */
export declare const DEFAULT_DATA_TABLE_COLUMN: DataTableColumn;
/**
 * Default DataTable config
 */
export declare const DEFAULT_DATA_TABLE_CONFIG: DataTableConfig;
/**
 * Component type metadata for UI
 */
export interface ComponentTypeMeta {
    type: ComponentType;
    label: string;
    description: string;
    icon: string;
    supports_options: boolean;
    supports_date_range: boolean;
    supports_data_table: boolean;
}
export declare const COMPONENT_TYPE_META: ComponentTypeMeta[];
/**
 * Get metadata for a component type
 */
export declare function get_component_type_meta(type: ComponentType): ComponentTypeMeta | undefined;
//# sourceMappingURL=types.d.ts.map