/**
 * Type definitions for HazoDataForm component
 * Data entry form for working papers using ViewFieldConfig/ViewSection types
 */
import type { ViewSection, ViewFieldConfig, DataFormTableColumn, StyleVariant, ReferenceData, ReferenceValueData, FieldActionComponents, FieldActionContext } from '../hazo_collab_form_view/types.js';
import type { StylesConfig } from '../../types/style_variant.js';
import type { FieldTypesConfig, FieldTypeDefinition } from '../../types/field_type_definition.js';
import type { DocLink, DocLinkClickEvent, UploadedFile } from '../../types/doc_link.js';
import type { StyleResolver } from '../../utils/style_resolver.js';
import type { FieldAction, FieldAuditConfig } from '../../types/field_action.js';
export type { ViewSection, ViewFieldConfig, DataFormTableColumn, StyleVariant, ReferenceData, ReferenceValueData };
export type { StylesConfig, FieldTypesConfig, FieldTypeDefinition };
export type { DocLink, DocLinkClickEvent, UploadedFile };
export type { FieldActionComponents, FieldActionContext };
export type { FieldAction, FieldAuditConfig };
/**
 * Props for HazoDataForm component
 */
export interface HazoDataFormProps {
    /** Form sections to render */
    sections: ViewSection[];
    /** Form mode - edit or view (default: 'edit') */
    mode?: 'edit' | 'view';
    /** Form data values keyed by field ID */
    form_data: Record<string, unknown>;
    /** Callback when a single field value changes */
    on_field_change?: (field_id: string, value: unknown) => void;
    /** Callback when form data changes (batch) */
    on_form_data_change?: (data: Record<string, unknown>) => void;
    /** Enable group-level collapse (default: false) */
    collapsible_groups?: boolean;
    /** Currently collapsed group IDs (controlled) */
    collapsed_groups?: string[];
    /** Callback when a group is toggled */
    on_group_toggle?: (group_id: string, collapsed: boolean) => void;
    /** Styles configuration for hierarchical styling */
    styles_config?: StylesConfig;
    /** Field types configuration for custom field types (TFN, ABN, etc.) */
    field_types_config?: FieldTypesConfig;
    /** Default currency symbol (default: '$') */
    default_currency_symbol?: string;
    /** Default decimal places for numeric formatting (default: 2) */
    default_decimal_places?: number;
    /** Percentage suffix (default: '%') */
    percentage_suffix?: string;
    /** Callback when a doc link is clicked */
    on_doc_link_click?: (event: DocLinkClickEvent) => void;
    /** Enable file upload UI */
    enable_file_upload?: boolean;
    /** Default accept_files for all fields (default: false). Per-field accept_files overrides this. */
    default_accept_files?: boolean;
    /** Callback when upload button is clicked */
    on_upload_click?: (field_id: string) => void;
    /** File panel display mode: 'dialog' (modal overlay) or 'sidebar' (embedded panel). Default: 'dialog' */
    file_panel_display_mode?: 'dialog' | 'sidebar';
    /** Default sidebar panel width as percentage (default: 50) */
    pdf_panel_default_size?: number;
    /** Minimum sidebar panel width as percentage (default: 25) */
    pdf_panel_min_size?: number;
    /** Pass-through props for the PdfViewer component (toolbar_enabled, show_save_button, etc.) */
    pdf_viewer_props?: Record<string, unknown>;
    /** Called when the sidebar panel opens for a field */
    on_panel_open?: (field_id: string) => void;
    /** Called when the sidebar panel closes */
    on_panel_close?: () => void;
    /** Called when the maximize/pop-out button is clicked. If not provided, uses built-in PdfViewerDialog. */
    on_panel_pop_out?: (field_id: string, file_items: unknown[]) => void;
    /** hazo_pdf FileAccessProvider for the embedded viewer */
    file_access_provider?: unknown;
    /** Upload handler for the sidebar panel. Receives the active field_id so the consumer can update form_data. */
    on_panel_upload?: (field_id: string, file: File, converted_pdf?: Uint8Array) => Promise<unknown>;
    /** Delete handler for the sidebar panel. Receives the active field_id. */
    on_panel_file_delete?: (field_id: string, file_id: string) => void;
    /** Uploaded files keyed by field ID */
    file_uploads?: Record<string, UploadedFile[]>;
    /** Show section headers (default: true) */
    show_section_headers?: boolean;
    /** Enable collapsible sections (default: false) */
    collapsible_sections?: boolean;
    /** List of collapsed section names */
    collapsed_sections?: string[];
    /** Callback on section collapse toggle */
    on_section_toggle?: (section_name: string, collapsed: boolean) => void;
    /** Callback on form submit */
    on_submit?: (data: Record<string, unknown>) => void;
    /** Reference data for prior year / comparison values */
    reference_data?: ReferenceData;
    /** Callback when a reference entry is deleted */
    on_reference_delete?: (field_id: string, index: number, reference_id?: string) => void;
    /**
     * Optional consumer-supplied components rendered inline next to every field.
     * Each slot receives the field's config, current value, and mode.
     *
     * Use this to inject per-field actions (audit history, RFI buttons, etc.)
     * that the form itself does not own.
     *
     * @deprecated Use `field_actions` instead. Will be removed in a future major.
     */
    field_action_components?: FieldActionComponents;
    /**
     * Convenience flag that turns on the built-in `FieldAudit` feature.
     * When `true` the form mounts a `FieldAuditProvider`, auto-records every
     * change to `form_data` as a `manual` entry, and overlays the audit icon
     * (`row_end`) + history panel (`row_below`) into `field_action_components`.
     * Consumer-supplied slot components win on collision.
     * @default false
     * @deprecated Use `field_audit` instead. Will be removed in a future major.
     */
    enable_field_audit?: boolean;
    /**
     * Idle window (ms) before the built-in audit watcher records a `manual`
     * entry. See `HazoCollabFormViewProps.audit_debounce_ms`.
     * @default 750
     * @deprecated Use `field_audit` with the new `field_actions` API instead. Will be removed in a future major.
     */
    audit_debounce_ms?: number;
    /**
     * Composable array of per-field action descriptors (v5.10+).
     * Replaces `field_action_components` for new integrations.
     */
    field_actions?: FieldAction[];
    /**
     * Configuration for the hazo_audit integration.
     * When set, mounts a FieldAuditIcon in the row_end slot via `field_actions`.
     */
    field_audit?: FieldAuditConfig;
    /**
     * Stable form ID passed in audit intent payloads.
     */
    form_id?: string;
    /** Root container class */
    class_name?: string;
}
/**
 * Internal configuration resolved from props
 */
export interface DataFormConfig {
    styles_config: StylesConfig;
    field_types_config: FieldTypesConfig;
    default_currency_symbol: string;
    default_decimal_places: number;
    percentage_suffix: string;
    style_resolver: StyleResolver;
    default_accept_files: boolean;
}
/**
 * Props for field renderer components
 */
export interface DataFormFieldRendererProps {
    field: ViewFieldConfig;
    mode: 'edit' | 'view';
    value: unknown;
    error?: string;
    config: DataFormConfig;
    on_change: (value: unknown) => void;
    on_blur?: () => void;
    on_doc_link_click?: () => void;
    badge_column_width?: string;
    value_column_width?: string;
    paired_value?: unknown;
    paired_on_change?: (value: unknown) => void;
    paired_error?: string;
    field_uploads?: UploadedFile[];
    on_upload_click?: () => void;
    upload_enabled?: boolean;
    /** When true, reserve space for the file column even if this field has no files/upload.
     *  This keeps all fields aligned when the form has enable_file_upload. */
    reserve_file_column?: boolean;
    /** Override label layout for this field (e.g. 'stacked' for horizontal groups) */
    force_layout?: 'inline' | 'stacked';
    /** Full reference value data for table fields (accordion rendering) */
    reference_value_data?: ReferenceValueData;
    /** Reference annotation text displayed below the field input */
    reference_annotation?: string;
    /** Tailwind background color class for the reference annotation (e.g. "bg-green-100") */
    reference_background_color?: string;
    /** Multiple reference entries for stacked display */
    reference_entries?: import('./shared/data_form_reference_value.js').DataFormReferenceEntry[];
    /** Callback when a reference entry is deleted */
    on_reference_delete?: (index: number) => void;
    /** Form data (needed by table field for row-level uploads lookup) */
    form_data?: Record<string, unknown>;
    /** Field change handler (needed by table for row-level upload changes) */
    on_field_change?: (field_id: string, value: unknown) => void;
    /** Section name (section.section_name) traced down from HazoDataForm */
    section_id?: string;
    /** Id of the nearest enclosing group (`field_type='group'`) */
    group_id?: string;
    /**
     * Consumer-supplied per-field action slots.
     * @deprecated Use `field_actions` instead. Will be removed in a future major.
     */
    field_action_components?: FieldActionComponents;
    /** Composable array of per-field action descriptors (v5.10+). */
    field_actions?: FieldAction[];
}
//# sourceMappingURL=types.d.ts.map