/**
 * Utility functions for HazoFieldSelectorDialog
 */
import type { FormTemplate, SearchableItem, FieldSelectorItem, SelectionBySection } from './types.js';
/**
 * Flatten form template into searchable items (sections, groups, AND fields)
 */
export declare function flatten_form_template(template: FormTemplate): SearchableItem[];
/**
 * Create FieldSelectorItem from search selection
 */
export declare function create_selection_from_search_item(item: SearchableItem, template: FormTemplate, existing_items: FieldSelectorItem[]): FieldSelectorItem[];
/**
 * Group selected items by section
 */
export declare function group_items_by_section(items: FieldSelectorItem[]): SelectionBySection[];
/**
 * Build output JSON from selected items with field-level filtering
 */
export declare function build_output_template(original_template: FormTemplate, selected_items: FieldSelectorItem[], include_icons_behaviour: boolean): FormTemplate;
/**
 * Update item orders after reordering
 */
export declare function update_item_orders(items: FieldSelectorItem[]): FieldSelectorItem[];
/**
 * Toggle a field's selection within a group
 */
export declare function toggle_field_in_group(items: FieldSelectorItem[], group_id: string, field_id: string): FieldSelectorItem[];
/**
 * Toggle expansion state of a group
 */
export declare function toggle_group_expansion(items: FieldSelectorItem[], group_id: string): FieldSelectorItem[];
/**
 * Add field to existing group's selection
 */
export declare function add_field_to_existing_group(items: FieldSelectorItem[], group_id: string, field_id: string): FieldSelectorItem[];
/**
 * Move item from one position to another
 */
export declare function move_item(items: FieldSelectorItem[], from_index: number, to_index: number, target_section_name?: string): FieldSelectorItem[];
/**
 * Find the section name at a given drop position
 */
export declare function get_section_at_index(items: FieldSelectorItem[], drop_index: number): string | null;
//# sourceMappingURL=utils.d.ts.map