/**
 * Type definitions for HazoAddFieldDialog component
 */
import type { ComponentType } from '../hazo_template_generator/types.js';
/**
 * Field type options including component types, group, and file textbox
 */
export type AddFieldType = ComponentType | 'Group' | 'HazoCollabFormFileTextbox';
/**
 * Context for the add field dialog - determines which field types are available
 * - 'section': Adding at section level (between groups) - only Group option
 * - 'group': Adding inside a group - all field types except Group
 */
export type AddFieldContext = 'section' | 'group';
/**
 * All available field types for the add field dialog
 */
export declare const ADD_FIELD_TYPES: AddFieldType[];
/**
 * Field types available in the Add Field dialog
 * Excludes DataTable (too complex for dialog configuration) and Group
 */
export declare const DIALOG_FIELD_TYPES: AddFieldType[];
/**
 * Option for Radio, Dropdown/Combo fields
 */
export interface FieldOption {
    /**
     * Display label for the option
     */
    label: string;
    /**
     * Value stored when option is selected
     */
    value: string;
}
/**
 * Checkbox-specific configuration
 */
export interface CheckboxConfig {
    /**
     * Label shown when checkbox is checked
     * @example "Yes", "Agreed", "Enabled"
     */
    checked_label?: string;
    /**
     * Label shown when checkbox is unchecked
     * @example "No", "Not Agreed", "Disabled"
     */
    unchecked_label?: string;
}
/**
 * Date-specific configuration
 */
export interface DateConfig {
    /**
     * Date selection mode
     * - 'single': Single date picker
     * - 'range': Date range picker (start and end)
     * @default 'single'
     */
    date_mode?: 'single' | 'range';
}
/**
 * Metadata for field types in the dialog
 */
export interface AddFieldTypeMeta {
    type: AddFieldType;
    label: string;
    description: string;
    /**
     * Icon name for display in the field type selector
     * Uses react-icons naming convention
     */
    icon: string;
}
/**
 * Field type metadata for display in the dialog
 */
export declare const ADD_FIELD_TYPE_META: AddFieldTypeMeta[];
/**
 * Get metadata for a field type
 */
export declare function get_add_field_type_meta(type: AddFieldType): AddFieldTypeMeta | undefined;
/**
 * File Textbox field-specific configuration
 */
export interface FileTextboxFieldConfig {
    /** Prompt area for classification */
    prompt_area?: string;
    /** Prompt key for classification */
    prompt_key?: string;
    /** Available classification tags */
    available_tags?: Array<{
        tag_id: string;
        tag_label: string;
        color?: string;
        description?: string;
    }>;
    /** File accept attribute (e.g., ".pdf,.jpg") */
    file_accept?: string;
    /** Maximum number of files */
    max_files?: number;
}
/**
 * Pending field entry in the multi-field add dialog
 * Represents a field being configured before submission
 */
export interface PendingFieldEntry {
    /**
     * Unique ID for dnd-kit sorting
     */
    id: string;
    /**
     * Question/label text
     */
    label: string;
    /**
     * Selected field type (default: HazoCollabFormInputbox)
     */
    field_type: AddFieldType;
    /**
     * Whether the field is required
     */
    required: boolean;
    /**
     * Public file accept mode
     */
    accept_public_files: 'none' | 'ai_upload' | 'basic_upload';
    /**
     * Options for Radio/Combo fields
     */
    options?: FieldOption[];
    /**
     * Date-specific configuration
     */
    date_config?: DateConfig;
    /**
     * Checkbox-specific configuration
     */
    checkbox_config?: CheckboxConfig;
    /**
     * Whether the accordion is expanded
     */
    is_expanded: boolean;
    /**
     * Source of the field entry
     * - 'custom': manually created via QuestionInput
     * - 'library': selected from the field library
     */
    source?: 'custom' | 'library';
    /**
     * Library provenance key in "area.key" format
     * Only set when source is 'library'
     */
    library_key?: string;
    /**
     * Full source FieldConfig from library for pass-through
     * Only set when source is 'library'
     */
    source_config?: Record<string, unknown>;
    /**
     * File Textbox-specific configuration
     * Only set when field_type is 'HazoCollabFormFileTextbox'
     */
    file_textbox_config?: FileTextboxFieldConfig;
}
/**
 * Definition for a new field to be added
 */
export interface NewFieldDefinition {
    /**
     * The type of field to create
     */
    field_type: AddFieldType;
    /**
     * The label/question for the field
     */
    label: string;
    /**
     * Optional description for the field
     */
    description?: string;
    /**
     * Whether the field is required/mandatory
     * @default false
     */
    required: boolean;
    /**
     * Options for Radio, Combo/Dropdown fields
     * Each option has a label (display text) and value (stored value)
     */
    options?: FieldOption[];
    /**
     * Checkbox-specific configuration
     * Allows customizing checked/unchecked labels
     */
    checkbox_config?: CheckboxConfig;
    /**
     * Date-specific configuration
     * Controls single date vs date range mode
     */
    date_config?: DateConfig;
    /**
     * Placeholder text for Inputbox, TextArea fields
     * Shown when field is empty
     */
    placeholder?: string;
    /**
     * Public file accept mode
     * Available for all field types except Document Upload (which is inherently file-based)
     * @default 'none'
     */
    accept_public_files?: 'none' | 'ai_upload' | 'basic_upload';
    /**
     * Full library FieldConfig pass-through
     * When a field is sourced from the library, this contains all the detailed
     * settings (input_type, input_format, validation, tooltip, etc.) for
     * `new_field_definition_to_config()` to use
     */
    source_config?: Record<string, unknown>;
    /**
     * File Textbox-specific configuration
     * Only set when field_type is 'HazoCollabFormFileTextbox'
     */
    file_textbox_config?: FileTextboxFieldConfig;
}
/**
 * Combobox components interface - for field type selector
 * Uses permissive typing to accept various shadcn component implementations
 */
export interface ComboboxComponents {
    Popover: React.ComponentType<any>;
    PopoverTrigger: React.ComponentType<any>;
    PopoverContent: React.ComponentType<any>;
    Command: React.ComponentType<any>;
    CommandInput?: React.ComponentType<any>;
    CommandList: React.ComponentType<any>;
    CommandEmpty: React.ComponentType<any>;
    CommandGroup: React.ComponentType<any>;
    CommandItem: React.ComponentType<any>;
}
/**
 * Dialog components interface - matches shadcn/ui dialog structure
 * Uses permissive typing to accept various shadcn component implementations
 *
 * IMPORTANT: As of v1.8.4, Dialog and DialogContent are IGNORED to ensure proper
 * portal/overlay behavior. The built-in Dialog and DialogContent are always used.
 * Only DialogHeader, DialogFooter, DialogTitle, and DialogDescription can be customized.
 */
export interface DialogComponents {
    /**
     * @deprecated Ignored since v1.8.4 - built-in Dialog is always used for proper portal behavior
     */
    Dialog?: React.ComponentType<any>;
    /**
     * @deprecated Ignored since v1.8.4 - built-in DialogContent is always used for proper portal/overlay behavior
     */
    DialogContent?: React.ComponentType<any>;
    DialogHeader?: React.ComponentType<any>;
    DialogFooter?: React.ComponentType<any>;
    DialogTitle?: React.ComponentType<any>;
    DialogDescription?: React.ComponentType<any>;
}
/**
 * Props for the HazoAddFieldDialog component
 */
export interface HazoAddFieldDialogProps {
    /**
     * Whether the dialog is open
     */
    open: boolean;
    /**
     * Callback when the open state changes
     */
    on_open_change: (open: boolean) => void;
    /**
     * Callback when user confirms the new fields
     * Changed in v2 to accept array of fields (breaking change)
     */
    on_confirm: (fields: NewFieldDefinition[]) => void;
    /**
     * Optional callback when user cancels
     */
    on_cancel?: () => void;
    /**
     * Optional custom title for the dialog
     * @default "Add New Field"
     */
    title?: string;
    /**
     * Optional field types to exclude from selection
     */
    exclude_types?: AddFieldType[];
    /**
     * shadcn/ui Dialog components - optional
     * Pass your app's Dialog, DialogContent, DialogHeader, etc.
     * If not provided, uses built-in dialog
     */
    dialog_components?: DialogComponents;
    /**
     * shadcn/ui Popover and Command components - optional
     * Pass your app's Popover, Command, etc. for the field type selector
     * If not provided, falls back to native select
     */
    combobox_components?: ComboboxComponents;
    /**
     * Enable Library/Custom tabs for selecting pre-defined fields from the Field Library
     * When false (default), the dialog shows only the custom input (no tabs, no breaking change)
     * @default true
     */
    enable_library?: boolean;
    /**
     * API endpoint for the field library
     * @default '/api/hazo_connect/sqlite/data'
     */
    library_api_base_url?: string;
    /**
     * Database table name for the field library
     * @default 'hazo_collab_form_elts'
     */
    library_table_name?: string;
    /**
     * Scope ID for filtering library elements
     */
    library_scope_id?: string | null;
    /**
     * Filter mode for library search
     * - 'fields_only': Only show field elements (no groups)
     * - 'both': Show both fields and groups
     * @default 'both'
     */
    library_filter_mode?: 'fields_only' | 'both';
    /**
     * Enable the File Textbox tab
     * When true, adds a "File Textbox" tab for adding HazoCollabFormFileTextbox fields
     * @default false
     */
    enable_file_textbox_tab?: boolean;
    /**
     * Default active tab when the dialog opens
     * Useful for controlling which tab is shown first
     */
    default_tab?: 'file_textbox' | 'library' | 'fields';
    /**
     * Hide the Classification section (prompt_area, prompt_key) in FileTextboxOptions
     */
    file_textbox_hide_classification?: boolean;
    /**
     * Hide the Classification Tags section in FileTextboxOptions
     */
    file_textbox_hide_tags?: boolean;
}
//# sourceMappingURL=types.d.ts.map