/**
 * Shared base functionality for collaboration form components
 * Provides common utilities and rendering logic for input and textarea fields
 */
import React from 'react';
import { type DataOkState } from './data_ok_multi_state.js';
import type { NoteEntry } from 'hazo_notes';
import type { IconsBehaviour } from '../types/icons_behaviour.js';
import type { TooltipConfig } from './hazo_collab_form_data_table.js';
export type { NoteEntry } from 'hazo_notes';
/**
 * Chat status for visual indicator on chat icon
 * - 'none': No messages, default color
 * - 'has_messages': Has messages (all read), orange color
 * - 'has_unread': Has unread messages, red color
 */
export type ChatStatus = 'none' | 'has_messages' | 'has_unread';
/**
 * Configuration for chat status icon colors
 * All values should be Tailwind CSS class names
 */
export interface ChatStatusColorsConfig {
    /** Icon color when field has unread messages (default: text-destructive) */
    icon_color_unread?: string;
    /** Container background when field has unread messages (default: bg-destructive/10) */
    icon_bg_unread?: string;
    /** Border color when field has unread messages (default: border-destructive) */
    icon_border_unread?: string;
    /** Icon color when field has messages but all are read (default: text-orange-500) */
    icon_color_has_messages?: string;
    /** Container background when field has messages (default: bg-orange-100) */
    icon_bg_has_messages?: string;
    /** Border color when field has messages (default: border-orange-400) */
    icon_border_has_messages?: string;
    /** Icon color when field has no messages (default: empty/inherit) */
    icon_color_none?: string;
    /** Container background when field has no messages (default: empty) */
    icon_bg_none?: string;
    /** Border color when field has no messages (default: empty) */
    icon_border_none?: string;
}
/**
 * Default chat status colors (used when no config is provided)
 */
export declare const DEFAULT_CHAT_STATUS_COLORS: Required<ChatStatusColorsConfig>;
/**
 * Control icon size configuration
 * Used for consistent sizing across form fields and summary view
 */
export declare const CONTROL_SIZE_CONFIG: {
    readonly sm: {
        readonly button: "h-7 w-7";
        readonly icon: "h-4 w-4";
    };
    readonly md: {
        readonly button: "h-9 w-9";
        readonly icon: "h-5 w-5";
    };
};
export type ControlSize = keyof typeof CONTROL_SIZE_CONFIG;
/**
 * React context for chat status colors configuration
 * Allows colors to be configured once at the form level and used by all child components
 */
export declare const ChatStatusColorsContext: React.Context<ChatStatusColorsConfig>;
/**
 * Context that controls how many fields appear per row in the form grid.
 *
 * - `field_columns: 1` (default): each field takes the full row width. The
 *   3-column chat-aligned grid (`1fr minmax(0,1fr) 400px`) is used so that an
 *   open chat panel slides neatly into the third column.
 * - `field_columns: 2` or `3`: fields flow in a multi-column grid. The chat
 *   panel side-by-side layout is suspended (chat panels open inline below the
 *   field instead).
 *
 * Provided by `FormViewProvider` (via the `field_columns` prop on
 * `HazoCollabFormView`) and consumed by `CollabFormFieldContainer` and
 * `HazoCollabFormGroup`.
 */
export declare const FieldColumnsContext: React.Context<{
    field_columns: 1 | 2 | 3;
}>;
/**
 * Hook to read the current field_columns value from context.
 * Returns 1 when no provider is mounted (single-column, backward-compatible default).
 */
export declare function useFieldColumns(): 1 | 2 | 3;
/**
 * Hook to access chat status colors from context
 */
export declare function use_chat_status_colors(): Required<ChatStatusColorsConfig>;
/**
 * Type for field validator value - supports all field value types
 */
export type FieldValidatorValue = string | boolean | Date | {
    from?: Date;
    to?: Date;
} | null;
/**
 * Common props shared by all collaboration form field components
 */
export interface CollabFormFieldBaseProps {
    /**
     * Label text for the field
     */
    label: string;
    /**
     * Tooltip text or configuration to display on hover
     * Can be a simple string or full TooltipConfig object
     * When provided, shows a help icon next to the label
     */
    tooltip?: string | TooltipConfig;
    /**
     * Context key for hazo_ihelp inline help icon.
     * When provided, renders an IhelpIcon next to the label that opens
     * the help dialog scoped to this context key.
     * Requires hazo_ihelp and IhelpProvider in the component tree.
     */
    ihelp_context_key?: string;
    /**
     * Error message to display below the field
     */
    error?: string;
    /**
     * Field identifier for chat context
     */
    field_id?: string;
    /**
     * Field data ID - separate identifier for data storage/retrieval
     */
    field_data_id?: string;
    /**
     * Field name for chat context
     */
    field_name?: string;
    /**
     * Callback when chat icon is clicked
     * Called with field_data_id and field_name
     */
    on_chat_click?: (field_data_id: string, field_name?: string) => void;
    /**
     * Whether this field has chat messages
     * When true, adds a red border to indicate active chat
     * @deprecated Use chat_status instead for more granular control
     */
    has_chat_messages?: boolean;
    /**
     * Chat status for visual indicator
     * - 'none': No messages, default color
     * - 'has_messages': Has messages (all read), orange indicator
     * - 'has_unread': Has unread messages, red indicator
     * Takes precedence over has_chat_messages if both are provided
     */
    chat_status?: ChatStatus;
    /**
     * Whether this field's chat is currently active/open
     * When true, adds a grey background to the field container
     */
    is_chat_active?: boolean;
    /**
     * Background color class to apply when chat is active
     * Default: "bg-muted"
     */
    chat_background_color?: string;
    /**
     * Whether this field has the default value for the data_ok checkbox
     * When true, adds a visual indicator (e.g., border) to show the field is in its default state
     */
    is_data_ok_default?: boolean;
    /**
     * Data OK checkbox state
     * If provided, controls the data OK checkbox state externally
     * Used when data_ok_mode is 'checkbox' (default)
     */
    data_ok_checked?: boolean;
    /**
     * Callback when data OK checkbox state changes
     * Used when data_ok_mode is 'checkbox' (default)
     */
    on_data_ok_change?: (checked: boolean) => void;
    /**
     * Data OK display mode
     * - 'checkbox': Binary checkbox (OK/Not OK) - default, backward compatible
     * - 'multi_state': Three-state selector (OK/Not OK/Pending) with click-cycle and dropdown
     */
    data_ok_mode?: 'checkbox' | 'multi_state';
    /**
     * Data OK multi-state value
     * Used when data_ok_mode is 'multi_state'
     */
    data_ok_value?: 'ok' | 'not_ok' | 'pending';
    /**
     * Callback when data OK multi-state value changes
     * Used when data_ok_mode is 'multi_state'
     */
    on_data_ok_value_change?: (value: 'ok' | 'not_ok' | 'pending') => void;
    /**
     * Custom className for the container
     */
    container_class_name?: string;
    /**
     * Background color for the field row (Tailwind class)
     * Used for data_ok-based highlighting in form view
     */
    row_background_color?: string;
    /**
     * Confirm state for prefilled field values (H.7).
     * When set, the cls_collab_field_container div gets an hcf-confirm-{state} class.
     */
    confirm_state?: 'prefilled' | 'confirmed' | 'edited';
    /**
     * Custom className for the label
     */
    label_class_name?: string;
    /**
     * Optional React nodes to render next to the label (e.g., edit/delete icons)
     * When provided, the label and actions are wrapped in a flex row
     */
    label_actions?: React.ReactNode;
    /**
     * Custom className for the field wrapper
     */
    field_wrapper_class_name?: string;
    /**
     * Custom className for the error message
     */
    error_class_name?: string;
    /**
     * HTML id attribute
     */
    id?: string;
    /**
     * HazoChat group ID (v3.0.0+)
     * Required for chat to work, maps to HazoChat chat_group_id
     * Identifies the chat group for group-based messaging
     */
    hazo_chat_group_id?: string;
    /**
     * HazoChat reference ID
     * Maps to HazoChat reference_id, defaults to field_data_id
     */
    hazo_chat_reference_id?: string;
    /**
     * HazoChat reference type
     * Maps to HazoChat reference_type, default: 'field'
     */
    hazo_chat_reference_type?: string;
    /**
     * HazoChat API base URL
     * Maps to HazoChat api_base_url
     */
    hazo_chat_api_base_url?: string;
    /**
     * HazoChat timezone
     * Maps to HazoChat timezone
     */
    hazo_chat_timezone?: string;
    /**
     * HazoChat title
     * Maps to HazoChat title, defaults to field_name or label
     */
    hazo_chat_title?: string;
    /**
     * HazoChat subtitle
     * Maps to HazoChat subtitle
     */
    hazo_chat_subtitle?: string;
    /**
     * HazoChat realtime mode
     * Maps to HazoChat realtime_mode: 'polling' (automatic) or 'manual' (refresh only)
     */
    hazo_chat_realtime_mode?: 'polling' | 'manual';
    /**
     * HazoChat polling interval
     * Maps to HazoChat polling_interval (milliseconds, only used when realtime_mode = 'polling')
     */
    hazo_chat_polling_interval?: number;
    /**
     * HazoChat messages per page
     * Maps to HazoChat messages_per_page
     */
    hazo_chat_messages_per_page?: number;
    /**
     * HazoChat className
     * Maps to HazoChat className
     */
    hazo_chat_class_name?: string;
    /**
     * HazoChat on close callback
     * Maps to HazoChat on_close
     */
    hazo_chat_on_close?: () => void;
    /**
     * Whether HazoChat is open
     * Controls chat visibility externally
     */
    hazo_chat_is_open?: boolean;
    /**
     * HazoChat on open change callback
     * Called when chat open state changes
     */
    hazo_chat_on_open_change?: (is_open: boolean) => void;
    /**
     * HazoChat show sidebar toggle
     * Maps to HazoChat show_sidebar_toggle: Show/hide the hamburger menu button
     * Default: false
     */
    hazo_chat_show_sidebar_toggle?: boolean;
    /**
     * HazoChat show delete button
     * Maps to HazoChat show_delete_button: Show/hide delete button on chat bubbles
     * Default: true
     */
    hazo_chat_show_delete_button?: boolean;
    /**
     * HazoChat bubble radius
     * Maps to HazoChat bubble_radius: Bubble border radius style
     * 'default' (rounded with tail) or 'full' (fully round)
     * Default: 'default'
     */
    hazo_chat_bubble_radius?: 'default' | 'full';
    /**
     * HazoChat read-only mode (v4.0.4+)
     * Maps to HazoChat read_only: When true, hides chat input for view-only mode
     * Default: false
     */
    hazo_chat_read_only?: boolean;
    /**
     * HazoChat hide references
     * Maps to HazoChat hide_references: When true, hides the references section in chat
     */
    hazo_chat_hide_references?: boolean;
    /**
     * HazoChat hide sidebar
     * Maps to HazoChat hide_sidebar: When true, hides the entire document viewer sidebar (v5.2.0+)
     */
    hazo_chat_hide_sidebar?: boolean;
    /**
     * HazoChat hide preview
     * Maps to HazoChat hide_preview: When true, hides message preview/attachment preview
     */
    hazo_chat_hide_preview?: boolean;
    /**
     * HazoChat display mode
     * Maps to HazoChat display_mode: Controls how chat is rendered
     * - 'embedded': Default embedded mode
     * - 'side_panel': Renders as a side panel
     * - 'overlay': Renders as an overlay
     */
    hazo_chat_display_mode?: 'embedded' | 'side_panel' | 'overlay';
    /**
     * HazoChat container element
     * Maps to HazoChat container_element: Container for portal rendering
     * Used with certain display modes to control where chat is rendered
     */
    hazo_chat_container_element?: HTMLElement | null;
    /**
     * HazoChat log polling
     * Maps to HazoChat log_polling: When true, logs polling activity to console (default: false)
     * Use this to debug polling issues or suppress console logs in production
     */
    hazo_chat_log_polling?: boolean;
    /**
     * Whether to disable the data OK checkbox
     * When true, the data OK checkbox will not be rendered
     * Useful when data OK is handled at a group level
     */
    disable_data_ok?: boolean;
    /**
     * Whether to disable the chat icon
     * When true, the chat icon will not be rendered
     * Useful when chat is handled at a group level
     */
    disable_chat?: boolean;
    /**
     * Whether the data OK checkbox is editable (clickable)
     * When false, the checkbox is disabled.
     * Default: false
     */
    data_ok_editable?: boolean;
    /**
     * Default value for the data OK checkbox/multi-state
     * - boolean: For checkbox mode (true = checked, false = unchecked)
     * - 'ok' | 'not_ok' | 'pending': For multi_state mode
     * Default: false for checkbox mode, 'pending' for multi_state mode
     */
    data_ok_default?: boolean | 'ok' | 'not_ok' | 'pending';
    /**
     * States to hide from user selection in the data OK control.
     * Hidden states will still display if current value matches,
     * but cannot be selected via click-cycle or dropdown.
     * @example ['pending'] - Users can only select 'ok' or 'not_ok'
     */
    data_ok_hidden_states?: DataOkState[];
    /**
     * Custom className for field width
     * Used to control the width of the field container
     */
    field_width_class_name?: string;
    /**
     * Whether the field is required
     * When true, displays required indicator on label
     */
    required?: boolean;
    /**
     * Multi-state radio configuration
     * If provided, displays a MultiStateRadio component next to the chat icon
     */
    multi_state_radio?: {
        /**
         * Array of state options for the multi-state radio
         * Each item should have label, value, and icon names
         */
        data: Array<{
            label: string;
            value: string;
            icon_selected?: string;
            icon_unselected?: string;
            /** Per-option foreground color (Tailwind class or hex) */
            color?: string;
            /** Per-option background color (Tailwind class or hex) */
            bgcolor?: string;
        }>;
        /**
         * Current selected value
         */
        value: string;
        /**
         * Callback when selection changes
         */
        onChange: (value: string) => void;
        /**
         * Icon set to use (e.g., 'fa', 'md', 'io5')
         * Default: 'io5'
         */
        icon_set?: string;
        /**
         * Selection mode: 'single' or 'multi'
         * Default: 'single'
         */
        selection?: 'single' | 'multi';
        /**
         * Default background color for the buttons
         * Can be a Tailwind CSS class name (e.g., "bg-red-100") or a hex color (e.g., "#fee2e2")
         * Default: "bg-muted"
         */
        bgcolor?: string;
        /**
         * Default foreground/icon color for the buttons
         * Can be a Tailwind CSS class name (e.g., "text-red-600") or a hex color (e.g., "#dc2626")
         * Default: "text-foreground"
         */
        fgcolor?: string;
        /**
         * Interaction mode
         * - 'click-cycle': Click cycles to next state, long-press opens dropdown (default)
         * - 'click-only': Click cycles, no dropdown
         * - 'dropdown-only': Click opens dropdown, no cycling
         */
        interaction_mode?: 'click-cycle' | 'click-only' | 'dropdown-only';
        /**
         * Long press duration in milliseconds to trigger dropdown
         * Default: 500
         */
        long_press_ms?: number;
        /**
         * Size of the button
         * - 'sm': 28x28px, icon 16px
         * - 'md': 36x36px, icon 20px (default)
         * - 'lg': 44x44px, icon 24px
         */
        size?: 'sm' | 'md' | 'lg';
    };
    /**
     * File upload configuration
     */
    /**
     * Whether to accept public file uploads
     * When true, displays a public files upload section
     */
    accept_files_public?: boolean;
    /**
     * Whether to accept private file uploads
     * When true and user has permission, displays a private files upload section
     */
    accept_files_private?: boolean;
    /**
     * Hide the upload dropzone but still show existing files
     * Used when autofill manages file uploads for the group
     */
    hide_upload_dropzone?: boolean;
    /**
     * Optional React node to replace the standard file upload dropzone
     * Used to render AutofillDropzone inside the Files accordion
     */
    autofill_dropzone?: React.ReactNode;
    /**
     * Server directory path where files should be saved
     * Required if accept_files_public or accept_files_private is true
     */
    files_dir?: string;
    /**
     * When true, the file upload accordion starts open even when no files exist.
     * Cascade: field > group > section > global_settings
     */
    default_file_accordion_open?: boolean;
    /**
     * Maximum file size in bytes per file
     * If not specified, no size limit is enforced
     */
    max_size?: number;
    /**
     * Minimum number of files required
     * If not specified, no minimum is enforced
     */
    min_files?: number;
    /**
     * Maximum number of files allowed
     * Default: 10
     */
    max_files?: number;
    /**
     * File type accept attribute (e.g., "image/*", ".pdf,.doc")
     * Follows HTML input accept attribute format
     */
    file_accept?: string;
    /**
     * Callback function called after a file is successfully uploaded
     * Receives file data and component reference
     */
    file_processor?: (file_data: FileData, component_ref: React.RefObject<any>) => Promise<void> | void;
    /**
     * File manager callbacks for hazo_files integration.
     * When provided, file upload/remove uses these callbacks.
     */
    file_manager?: import('../types/file_manager.js').FileManagerCallbacks;
    /**
     * Set of file IDs currently being validated by LLM (shows spinner overlay on file card)
     */
    validating_file_ids?: Set<string>;
    /**
     * Set of file IDs that have validation errors (shows error badge on file card)
     */
    error_file_ids?: Set<string>;
    /**
     * Set of file IDs that passed validation (shows green checkmark badge on file card)
     */
    passed_file_ids?: Set<string>;
    /**
     * Map of file_id → array of issue descriptions for error popover
     */
    error_file_details?: Record<string, string[]>;
    /**
     * Controlled files state
     * When provided, component is controlled and uses this array
     * When not provided, component manages files internally
     */
    files?: import('../types/file_attachment.js').FormFileAttachment[];
    /**
     * Callback when files change
     * Called with the updated files array
     */
    on_files_change?: (files: import('../types/file_attachment.js').FormFileAttachment[]) => void;
    /**
     * Custom file validator callback
     * Called before file upload to validate each file
     * Returns error string to reject file, null to accept
     * If validation fails, the file will not be uploaded
     */
    file_validator?: (file: File) => string | null;
    /**
     * Permission string required to view/upload private files
     * Uses hazo_auth permission checking
     * Required when accept_files_private is true
     */
    private_files_permission?: string;
    /**
     * Override permission check for private files
     * When true, bypasses hazo_auth permission check and shows private files section
     * Useful for testing or when permission is already verified by parent component
     */
    can_access_private_files?: boolean;
    /**
     * Controlled private files state
     * When provided, component is controlled and uses this array for private files
     * Separate from `files` prop which is used for public files
     */
    private_files?: import('../types/file_attachment.js').FormFileAttachment[];
    /**
     * Callback when private files change
     * Called with the updated private files array
     */
    on_private_files_change?: (files: import('../types/file_attachment.js').FormFileAttachment[]) => void;
    /**
     * Custom field value validator callback
     * Called on value change to validate the field value
     * Returns error string to show error, null if valid
     * Supports: string, boolean, Date, DateRangeValue, null
     */
    field_validator?: (value: FieldValidatorValue) => string | null;
    /**
     * Whether to enable the notes feature for this field
     * When true, displays a notes icon next to the chat icon
     * Default: false
     */
    enable_notes?: boolean;
    /**
     * Whether to disable the notes icon
     * When true, the notes icon will not be rendered even if enable_notes is true
     * Useful when notes are handled at a group level
     */
    disable_notes?: boolean;
    /**
     * Array of existing notes for this field
     * Each note contains user info, timestamp, and note content
     */
    notes?: NoteEntry[];
    /**
     * Callback when notes array changes
     * Called with the updated notes array after adding a new note
     */
    on_notes_change?: (notes: NoteEntry[]) => void;
    /**
     * Whether this field has any notes
     * When true, adds visual indicator (amber styling on notes icon)
     */
    has_notes?: boolean;
    /**
     * Whether the notes panel is currently active/open
     * When true, provides visual feedback (optional, for external control)
     */
    is_notes_active?: boolean;
    /**
     * Notes panel presentation style
     * - 'popover': Compact popup near the icon (default)
     * - 'slide_panel': Full-height panel that slides in from the right
     */
    notes_panel_style?: 'popover' | 'slide_panel';
    /**
     * Notes panel background color (Tailwind class)
     * Example: 'bg-yellow-100', 'bg-blue-50'
     */
    notes_background_color?: string;
    /**
     * Notes save behavior
     * - 'explicit': User clicks Save/Cancel buttons (default)
     * - 'auto': Note saved automatically when panel closes or on blur
     */
    notes_save_mode?: 'explicit' | 'auto';
    /**
     * Current user information for creating new notes
     * If not provided, will attempt to fetch from /api/hazo_auth/me
     */
    current_user?: {
        id?: string;
        name: string;
        email: string;
        profile_image?: string;
    };
    /**
     * Reference value to display in a tag below the field input
     * If provided, displays in format "reference_label: reference_value" or just "reference_value"
     * Supports string, number (formatted as currency if appropriate), and boolean (Yes/No)
     */
    reference_value?: string | number | boolean;
    /**
     * Reference label to display in a tag below the field input
     * If provided alone, displays just "reference_label"
     * If provided with reference_value, displays "reference_label: reference_value"
     */
    reference_label?: string;
    /**
     * Background color class for the reference tag
     * Default: "bg-muted"
     */
    reference_tag_background_color?: string;
    /**
     * Whether to enable the visibility toggle feature for this field
     * When true, displays a visibility icon that allows toggling field visibility
     * Default: false
     */
    enable_visibility_toggle?: boolean;
    /**
     * Whether to disable the visibility toggle icon
     * When true, the visibility icon will not be rendered even if enable_visibility_toggle is true
     * Useful when visibility is handled at a group level
     */
    disable_visibility_toggle?: boolean;
    /**
     * Current visibility state of the field
     * - 'visible': Field is visible to all users (default)
     * - 'hidden': Field is hidden from responders but visible to authors
     */
    visibility?: 'visible' | 'hidden';
    /**
     * Callback when visibility state changes
     * Called with the new visibility state
     */
    on_visibility_change?: (visibility: 'visible' | 'hidden') => void;
    /**
     * User role for visibility and authoring features
     * - 'author': Can see and toggle visibility of hidden fields, can delete/lock fields
     * - 'responder': Cannot see hidden fields, cannot use author features
     * Default: 'responder'
     */
    user_role?: 'author' | 'responder';
    /**
     * Whether this field supports additional entries (cloning)
     * When true, shows "+" icon to add duplicate entries below
     * Default: false
     */
    additional_entry?: boolean;
    /**
     * Maximum number of additional entries allowed
     * Default: 10
     */
    max_additional_entries?: number;
    /**
     * Entry index for this field (0 = original, 1+ = additional entries)
     * Used internally to track position
     */
    entry_index?: number;
    /**
     * Total number of entries for this field (including original)
     * Used internally to determine if "+" should show
     */
    entry_count?: number;
    /**
     * Callback when user clicks "+" to add a new entry
     * Called with the field_id of the source field
     */
    on_add_entry?: (field_id: string) => void;
    /**
     * Callback when user clicks delete on an additional entry
     * Called with the field_id (includes index suffix like "field_id:1")
     */
    on_delete_entry?: (field_id: string) => void;
    /**
     * Whether this is an additional (cloned) entry vs the original
     * When true, shows delete icon instead of add icon
     */
    is_additional_entry?: boolean;
    /**
     * Whether to enable the delete field feature
     * When true, displays a delete icon that allows soft-deleting the field
     * Only visible to users with 'author' role
     * Default: false
     */
    enable_delete?: boolean;
    /**
     * Whether to disable the delete icon
     * When true, the delete icon will not be rendered even if enable_delete is true
     * Useful when delete is handled at a group level
     */
    disable_delete?: boolean;
    /**
     * Callback when user clicks delete on a field
     * Called with the field_id
     */
    on_delete?: (field_id: string) => void;
    /**
     * Whether to enable the lock field feature
     * When true, displays a lock icon that allows locking/unlocking the field
     * Only visible to users with 'author' role
     * Default: false
     */
    enable_lock?: boolean;
    /**
     * Whether to disable the lock icon
     * When true, the lock icon will not be rendered even if enable_lock is true
     * Useful when lock is handled at a group level
     */
    disable_lock?: boolean;
    /**
     * Current lock state of the field
     * When true, the field is read-only (cannot be edited)
     * Notes and chat are still functional when locked
     */
    locked?: boolean;
    /**
     * Callback when lock state changes
     * Called with the new lock state (true = locked, false = unlocked)
     */
    on_lock_change?: (locked: boolean) => void;
    /**
     * Whether to enable the skip/N/A feature for this field
     * When true, displays a "N/A" icon that allows marking the field as not applicable
     * Default: false
     */
    enable_skip?: boolean;
    /**
     * Whether to disable the skip icon
     * When true, the skip icon will not be rendered even if enable_skip is true
     * Useful when skip is handled at a group level
     */
    disable_skip?: boolean;
    /**
     * Current skipped state of the field
     * When true, the field is marked as not applicable
     */
    skipped?: boolean;
    /**
     * Callback when skipped state changes
     * Called with the new skipped state (true = skipped/N/A, false = applicable)
     */
    on_skip_change?: (skipped: boolean) => void;
    /**
     * Display mode for edit action icons (lock, visibility, delete)
     * - 'auto': Show single icon when only one action enabled, dropdown when multiple (default)
     * - 'separate': Always show individual icons side by side
     * - 'dropdown': Always show consolidated 3-dots dropdown menu
     */
    edit_actions_display?: 'auto' | 'separate' | 'dropdown';
    /**
     * Include chat icon in the consolidated 3-dots dropdown menu
     * When true, chat icon moves into the edit actions dropdown
     * Default: false (chat icon shows separately)
     */
    include_chat_in_dropdown?: boolean;
    /**
     * Include notes icon in the consolidated 3-dots dropdown menu
     * When true, notes icon moves into the edit actions dropdown
     * Default: false (notes icon shows separately)
     */
    include_notes_in_dropdown?: boolean;
    /**
     * Extract chat icon from dropdown when it has messages
     * Only applies when include_chat_in_dropdown=true
     * When true and has_chat_messages=true, chat icon shows separately (extracted)
     * Default: false
     */
    extract_active_chat?: boolean;
    /**
     * Extract notes icon from dropdown when notes exist
     * Only applies when include_notes_in_dropdown=true
     * When true and has_notes=true, notes icon shows separately (extracted)
     * Default: false
     */
    extract_active_notes?: boolean;
    /**
     * Remove borders from all action buttons
     * When true, action icons (data OK, chat, notes, lock, visibility, delete, etc.)
     * will render without borders for a cleaner appearance
     * Default: false (buttons have borders)
     */
    action_buttons_borderless?: boolean;
    /**
     * Icons behaviour configuration for per-icon border control
     * When provided, border_on/border_off arrays control which icons have borders
     * This takes precedence over action_buttons_borderless for individual icons
     */
    icons_behaviour?: IconsBehaviour;
    /**
     * Active role ID for role-based icon visibility
     * Must match a role_id in icons_behaviour.roles
     */
    active_role?: string;
}
/**
 * File data structure for uploaded files
 * @deprecated Use FormFileAttachment from 'hazo_collab_forms' instead.
 * FileData is retained for backward compatibility and migration utilities.
 */
export interface FileData {
    /**
     * Server path where file is saved
     */
    file_path: string;
    /**
     * Original filename
     */
    file_name: string;
    /**
     * File size in bytes
     */
    file_size: number;
    /**
     * MIME type
     */
    file_type: string;
    /**
     * Unique identifier for the file
     */
    file_id: string;
    /**
     * Upload timestamp
     */
    uploaded_at: Date;
    /**
     * File visibility level
     * - 'public': Visible to all users (default)
     * - 'private': Visible only to users with the required permission
     * If not specified, defaults to 'public' for backward compatibility
     */
    visibility?: 'public' | 'private';
}
/**
 * Resolve effective chat status from chat_status or deprecated has_chat_messages
 * @param chat_status - New chat status prop
 * @param has_chat_messages - Deprecated boolean prop
 * @returns Resolved ChatStatus value
 */
export declare function resolve_chat_status(chat_status?: ChatStatus, has_chat_messages?: boolean): ChatStatus;
/**
 * Get CSS classes for chat status indicator
 * @param status - Chat status
 * @param borderless - Whether button is borderless
 * @param colors - Optional custom colors config (uses defaults if not provided)
 * @returns Object with icon_class, container_class, and border_class
 */
export declare function get_chat_status_classes(status: ChatStatus, borderless?: boolean, colors?: ChatStatusColorsConfig): {
    icon_class: string;
    container_class: string;
    border_class: string;
};
/**
 * Hook for common collaboration form field functionality
 */
export declare function use_collab_form_field({ label, field_id, id, field_data_id, field_name, on_chat_click, hazo_chat_group_id, hazo_chat_on_open_change, hazo_chat_is_open, hazo_chat_on_close, }: Pick<CollabFormFieldBaseProps, 'label' | 'field_id' | 'id' | 'field_data_id' | 'field_name' | 'on_chat_click' | 'hazo_chat_group_id' | 'hazo_chat_on_open_change' | 'hazo_chat_is_open' | 'hazo_chat_on_close'>): {
    field_id_final: string;
    handle_chat_icon_click: () => void;
    handle_chat_close: () => void;
    chat_is_open: boolean;
    is_chat_disabled: boolean;
    chat_group_id: string | undefined;
    set_internal_chat_is_open: React.Dispatch<React.SetStateAction<boolean>>;
};
/**
 * Render the container wrapper with colored border for chat messages and grey background when chat is active
 */
export declare function CollabFormFieldContainer({ has_chat_messages, chat_status, is_chat_active, chat_background_color, is_data_ok_default, container_class_name, row_background_color, confirm_state, force_full_row, children, hazo_chat_is_open, hazo_chat_group_id, hazo_chat_reference_id, hazo_chat_reference_type, hazo_chat_api_base_url, hazo_chat_timezone, hazo_chat_title, hazo_chat_subtitle, hazo_chat_realtime_mode, hazo_chat_polling_interval, hazo_chat_messages_per_page, hazo_chat_class_name, hazo_chat_on_close, hazo_chat_show_sidebar_toggle, hazo_chat_show_delete_button, hazo_chat_bubble_radius, hazo_chat_read_only, hazo_chat_hide_references, hazo_chat_hide_sidebar, hazo_chat_hide_preview, hazo_chat_display_mode, hazo_chat_container_element, hazo_chat_log_polling, field_data_id, field_name, label, files, }: Pick<CollabFormFieldBaseProps, 'has_chat_messages' | 'chat_status' | 'is_chat_active' | 'chat_background_color' | 'is_data_ok_default' | 'container_class_name' | 'row_background_color' | 'hazo_chat_is_open' | 'hazo_chat_group_id' | 'hazo_chat_reference_id' | 'hazo_chat_reference_type' | 'hazo_chat_api_base_url' | 'hazo_chat_timezone' | 'hazo_chat_title' | 'hazo_chat_subtitle' | 'hazo_chat_realtime_mode' | 'hazo_chat_polling_interval' | 'hazo_chat_messages_per_page' | 'hazo_chat_class_name' | 'hazo_chat_on_close' | 'hazo_chat_show_sidebar_toggle' | 'hazo_chat_show_delete_button' | 'hazo_chat_bubble_radius' | 'hazo_chat_read_only' | 'hazo_chat_hide_references' | 'hazo_chat_hide_sidebar' | 'hazo_chat_hide_preview' | 'hazo_chat_display_mode' | 'hazo_chat_container_element' | 'hazo_chat_log_polling' | 'field_data_id' | 'field_name' | 'label' | 'files' | 'confirm_state'> & {
    children: React.ReactNode;
    /**
     * When true the container always uses `col-span-full`, spanning the entire
     * grid row even when `field_columns > 1`. Use this for wide field types
     * (textarea, data table) that should never share a row with another field.
     * Default: false.
     */
    force_full_row?: boolean;
}): import("react/jsx-runtime").JSX.Element;
export declare function CollabFormFieldLabel({ field_id_final, label, label_class_name, required, visibility, locked, tooltip, ihelp_context_key, label_actions, clarification_count, has_clarification, file_error_count, on_file_error_click, }: {
    field_id_final: string;
    label: string;
    label_class_name?: string;
    required?: boolean;
    /** Field visibility state - shows HiddenBadge when 'hidden' */
    visibility?: 'visible' | 'hidden';
    /** Field locked state - shows ProtectedBadge when true */
    locked?: boolean;
    /** Tooltip text or configuration */
    tooltip?: string | TooltipConfig;
    /** Context key for hazo_ihelp inline help icon */
    ihelp_context_key?: string;
    /** Optional actions to render next to the label (e.g., edit/delete icons) */
    label_actions?: React.ReactNode;
    /** Number of active clarification issues for this field */
    clarification_count?: number;
    /** Persistent flag indicating field has/had clarification issues */
    has_clarification?: boolean;
    /** Number of files with validation errors attached to this field */
    file_error_count?: number;
    /** Callback when file error badge is clicked — opens clarification dialog */
    on_file_error_click?: () => void;
}): import("react/jsx-runtime").JSX.Element;
/**
 * Render the chat icon button
 */
export declare function CollabFormChatIcon({ label, error, on_click, multi_state_radio, has_chat_messages, chat_status, disabled, button_disabled, borderless, size, }: {
    label: string;
    error?: string;
    on_click: () => void;
    multi_state_radio?: CollabFormFieldBaseProps['multi_state_radio'];
    /** @deprecated Use chat_status instead */
    has_chat_messages?: boolean;
    chat_status?: ChatStatus;
    disabled?: boolean;
    button_disabled?: boolean;
    borderless?: boolean;
    /** Button/icon size: 'sm' for summary view, 'md' for form fields (default) */
    size?: ControlSize;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the error message
 */
export declare function CollabFormFieldError({ field_id_final, error, error_class_name, }: {
    field_id_final: string;
    error?: string;
    error_class_name?: string;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Props for CollabFormFieldReferenceTag
 */
export interface CollabFormFieldReferenceTagProps {
    /** Array of reference entries or single entry */
    reference_data?: import('./hazo_collab_form_view/types.js').ReferenceValueData | import('./hazo_collab_form_view/types.js').ReferenceValueData[];
    /** Legacy: single reference value */
    reference_value?: string | number | boolean;
    /** Legacy: single reference label */
    reference_label?: string;
    /** Legacy: single background color */
    reference_tag_background_color?: string;
    /** Callback when a reference entry is deleted */
    on_reference_delete?: (index: number) => void;
}
/**
 * Render the reference tag(s) below the field input
 * Supports both single and multiple reference entries with optional delete
 */
export declare function CollabFormFieldReferenceTag({ reference_data, reference_value, reference_label, reference_tag_background_color, on_reference_delete, }: CollabFormFieldReferenceTagProps): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the data OK checkbox or multi-state selector
 * Provides consistent data OK functionality across all form fields
 * Supports both binary checkbox mode and multi-state mode
 */
export declare function CollabFormDataOkCheckbox({ label, data_ok_checked: controlled_data_ok_checked, on_data_ok_change, data_ok_mode, data_ok_value: controlled_data_ok_value, on_data_ok_value_change, data_ok_default, data_ok_hidden_states, disabled, editable, borderless, }: {
    label: string;
    data_ok_checked?: boolean;
    on_data_ok_change?: (checked: boolean) => void;
    data_ok_mode?: 'checkbox' | 'multi_state';
    data_ok_value?: DataOkState;
    on_data_ok_value_change?: (value: DataOkState) => void;
    data_ok_default?: boolean | 'ok' | 'not_ok' | 'pending';
    data_ok_hidden_states?: DataOkState[];
    disabled?: boolean;
    editable?: boolean;
    borderless?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the file upload component
 * Provides file upload functionality for collaboration form fields
 */
export declare function CollabFormFileUploadSection({ field_id_final, accept_files_public, accept_files_private, files_dir, default_file_accordion_open, max_size, min_files, max_files, file_accept, file_validator, file_manager, files, on_files_change, private_files_permission, can_access_private_files, private_files, on_private_files_change, show_file_status, allow_reupload, scope_id, uploaded_by, validating_file_ids, error_file_ids, passed_file_ids, error_file_details, clarification_items, clarification_callbacks, hide_upload_dropzone, autofill_dropzone, }: Pick<CollabFormFieldBaseProps, 'accept_files_public' | 'accept_files_private' | 'files_dir' | 'default_file_accordion_open' | 'max_size' | 'min_files' | 'max_files' | 'file_accept' | 'file_validator' | 'file_manager' | 'files' | 'on_files_change' | 'private_files_permission' | 'can_access_private_files' | 'private_files' | 'on_private_files_change'> & {
    field_id_final: string;
    show_file_status?: boolean;
    allow_reupload?: boolean;
    scope_id?: string;
    uploaded_by?: string;
    validating_file_ids?: Set<string>;
    error_file_ids?: Set<string>;
    passed_file_ids?: Set<string>;
    error_file_details?: Record<string, string[]>;
    clarification_items?: import('../types/clarification.js').ClarificationItem[];
    clarification_callbacks?: import('../types/clarification.js').ClarificationCallbacks;
    hide_upload_dropzone?: boolean;
    autofill_dropzone?: React.ReactNode;
}): import("react/jsx-runtime").JSX.Element;
/**
 * Render the notes icon button with popover or slide panel
 * Wraps HazoNotesIcon from hazo_notes package (dynamically loaded)
 *
 * **Modes:**
 * - **Uncontrolled mode** (recommended): Don't pass `notes` or `on_notes_change`.
 *   The component will use hazo_notes internal hooks to fetch/persist notes via API.
 *   Requires hazo_notes API routes to be set up in your app.
 *
 * - **Controlled mode**: Pass both `notes` and `on_notes_change` to manage notes
 *   state externally. You are responsible for persisting notes.
 */
export declare function CollabFormNotesIcon({ label, has_notes, notes, on_notes_change, disabled, current_user, field_data_id, className, icon_size, show_border, panel_style, background_color, save_mode, open, onOpenChange, default_open, }: {
    label: string;
    /** Whether the field has notes (used for indicator). Auto-detected in uncontrolled mode. */
    has_notes?: boolean;
    /** Controlled notes array. If not provided, uses hazo_notes internal API. */
    notes?: NoteEntry[];
    /** Callback when notes change. Required for controlled mode. */
    on_notes_change?: (notes: NoteEntry[]) => void;
    disabled?: boolean;
    current_user?: {
        id?: string;
        name: string;
        email: string;
        profile_image?: string;
    };
    field_data_id?: string;
    className?: string;
    /** Icon button size in pixels (default: 28, matches other control icons) */
    icon_size?: number;
    /** Whether to show border around the icon button (default: true) */
    show_border?: boolean;
    /** Panel presentation style: 'popover' (compact popup) or 'slide_panel' (full-height right panel) */
    panel_style?: 'popover' | 'slide_panel';
    /** Background color for notes panel (Tailwind class, e.g., 'bg-yellow-100') */
    background_color?: string;
    /** Save behavior: 'explicit' (Save/Cancel buttons) or 'auto' (save on blur/close) */
    save_mode?: 'explicit' | 'auto';
    /** Controlled open state - when provided, component is in controlled mode */
    open?: boolean;
    /** Callback when open state changes (for controlled mode) */
    onOpenChange?: (open: boolean) => void;
    /** Initial open state (for uncontrolled mode) */
    default_open?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the visibility toggle icon button
 * Shows eye icon when visible, eye-off icon when hidden
 * Only renders for users with 'author' role
 */
export declare function CollabFormVisibilityIcon({ label, visibility, on_visibility_change, disabled, user_role, borderless, size, editable, }: {
    label: string;
    visibility?: 'visible' | 'hidden';
    on_visibility_change?: (visibility: 'visible' | 'hidden') => void;
    disabled?: boolean;
    user_role?: 'author' | 'responder';
    borderless?: boolean;
    /** Button/icon size: 'sm' for summary view, 'md' for form fields (default) */
    size?: ControlSize;
    /** Whether the control is editable/clickable (default: true) */
    editable?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the add entry icon button
 * Shows "+" icon to duplicate a field entry
 */
export declare function CollabFormAddEntryIcon({ label, field_id, on_add_entry, disabled, borderless, }: {
    label: string;
    field_id: string;
    on_add_entry?: (field_id: string) => void;
    disabled?: boolean;
    borderless?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the delete entry icon button
 * Shows trash icon to remove an additional entry
 * Only used for additional entries (not the original)
 */
export declare function CollabFormDeleteEntryIcon({ label, field_id, on_delete_entry, disabled, borderless, }: {
    label: string;
    field_id: string;
    on_delete_entry?: (field_id: string) => void;
    disabled?: boolean;
    borderless?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the delete field icon button
 * Shows trash outline icon to soft-delete a field
 * Only renders for users with 'author' role
 */
export declare function CollabFormDeleteFieldIcon({ label, field_id, on_delete, disabled, user_role, borderless, size, is_deleted, }: {
    label: string;
    field_id: string;
    on_delete?: (field_id: string) => void;
    disabled?: boolean;
    user_role?: 'author' | 'responder';
    borderless?: boolean;
    /** Button/icon size: 'sm' for summary view, 'md' for form fields (default) */
    size?: ControlSize;
    /** Whether the field is currently deleted (shows Undo button) */
    is_deleted?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the lock icon button
 * Shows lock/unlock icon to toggle field read-only state
 * Only renders for users with 'author' role
 */
export declare function CollabFormLockIcon({ label, locked, on_lock_change, disabled, user_role, borderless, size, editable, }: {
    label: string;
    locked?: boolean;
    on_lock_change?: (locked: boolean) => void;
    disabled?: boolean;
    user_role?: 'author' | 'responder';
    borderless?: boolean;
    /** Button/icon size: 'sm' for summary view, 'md' for form fields (default) */
    size?: ControlSize;
    /** Whether the control is editable/clickable (default: true) */
    editable?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Render the skip/not applicable icon button
 * Shows "N/A" text to mark a field as not applicable
 * When skipped, the icon has a filled background
 */
export declare function CollabFormSkipIcon({ label, skipped, on_skip_change, disabled, borderless, size, editable, }: {
    label: string;
    skipped?: boolean;
    on_skip_change?: (skipped: boolean) => void;
    disabled?: boolean;
    borderless?: boolean;
    /** Button/icon size: 'sm' for summary view, 'md' for form fields (default) */
    size?: ControlSize;
    /** Whether the control is editable/clickable (default: true) */
    editable?: boolean;
}): import("react/jsx-runtime").JSX.Element | null;
/**
 * Props for the consolidated edit actions dropdown
 */
export interface CollabFormEditActionsDropdownProps {
    label: string;
    field_id: string;
    user_role?: 'author' | 'responder';
    enable_lock?: boolean;
    disable_lock?: boolean;
    locked?: boolean;
    on_lock_change?: (locked: boolean) => void;
    enable_visibility_toggle?: boolean;
    disable_visibility_toggle?: boolean;
    visibility?: 'visible' | 'hidden';
    on_visibility_change?: (visibility: 'visible' | 'hidden') => void;
    enable_delete?: boolean;
    disable_delete?: boolean;
    on_delete?: (field_id: string) => void;
    edit_actions_display?: 'auto' | 'separate' | 'dropdown';
    borderless?: boolean;
    /** Icon size: 'sm' for summary view, 'md' for form fields (default) */
    size?: ControlSize;
    include_chat_in_dropdown?: boolean;
    enable_chat?: boolean;
    disable_chat?: boolean;
    /** @deprecated Use chat_status instead */
    has_chat_messages?: boolean;
    chat_status?: ChatStatus;
    on_chat_click?: () => void;
    extract_active_chat?: boolean;
    include_notes_in_dropdown?: boolean;
    enable_notes?: boolean;
    disable_notes?: boolean;
    has_notes?: boolean;
    notes?: NoteEntry[];
    on_notes_change?: (notes: NoteEntry[]) => void;
    current_user?: {
        id?: string;
        name: string;
        email: string;
        profile_image?: string;
    };
    field_data_id?: string;
    extract_active_notes?: boolean;
    notes_panel_style?: 'popover' | 'slide_panel';
    notes_background_color?: string;
    notes_save_mode?: 'explicit' | 'auto';
    icons_behaviour?: IconsBehaviour;
}
/**
 * Consolidated edit actions dropdown component
 * Shows ellipsis dropdown when multiple edit actions (lock, visibility, delete, chat, notes) are enabled
 * Shows single icon directly when only one action is enabled
 * Chat and notes can be included via include_chat_in_dropdown and include_notes_in_dropdown props
 * Active chat/notes can be extracted from dropdown via extract_active_chat and extract_active_notes props
 */
export declare function CollabFormEditActionsDropdown({ label, field_id, user_role, enable_lock, disable_lock, locked, on_lock_change, enable_visibility_toggle, disable_visibility_toggle, visibility, on_visibility_change, enable_delete, disable_delete, on_delete, edit_actions_display, borderless, size, include_chat_in_dropdown, enable_chat, disable_chat, has_chat_messages, chat_status, on_chat_click, extract_active_chat, include_notes_in_dropdown, enable_notes, disable_notes, has_notes, notes, on_notes_change, current_user, field_data_id, extract_active_notes, notes_panel_style, notes_background_color, notes_save_mode, icons_behaviour, }: CollabFormEditActionsDropdownProps): import("react/jsx-runtime").JSX.Element | null;
/**
 * Props for the add field icon component
 */
export interface CollabFormAddFieldIconProps {
    /** Field ID for accessibility labels */
    field_id: string;
    /** Callback when the add button is clicked */
    on_click?: () => void;
    /** Whether the button is disabled */
    disabled?: boolean;
    /** Optional custom className */
    className?: string;
    /** Color variant: 'field' for light blue, 'group' for light green */
    variant?: 'field' | 'group';
}
/**
 * Props for the edit field config icon component
 */
export interface CollabFormEditFieldConfigIconProps {
    /** Field ID for accessibility labels */
    field_id: string;
    /** Field label for accessibility */
    label?: string;
    /** Callback when the edit button is clicked */
    on_click?: () => void;
    /** Whether the button is disabled */
    disabled?: boolean;
    /** Optional custom className */
    className?: string;
}
/**
 * Render the edit field config icon button
 * Shows a pencil icon to edit field properties (label, type, etc.)
 * Used by control_edit_field in icons_behaviour
 */
export declare function CollabFormEditFieldConfigIcon({ field_id, label, on_click, disabled, className, }: CollabFormEditFieldConfigIconProps): React.ReactElement | null;
/**
 * Props for the delete field structure icon component
 */
export interface CollabFormDeleteFieldStructureIconProps {
    /** Field ID for accessibility labels */
    field_id: string;
    /** Field label for accessibility */
    label?: string;
    /** Callback when the delete button is clicked */
    on_click?: () => void;
    /** Whether the button is disabled */
    disabled?: boolean;
    /** Optional custom className */
    className?: string;
}
/**
 * Render the delete field structure icon button
 * Shows a trash icon to remove field from form structure (hard delete)
 * Used by control_delete_field in icons_behaviour
 */
export declare function CollabFormDeleteFieldStructureIcon({ field_id, label, on_click, disabled, className, }: CollabFormDeleteFieldStructureIconProps): React.ReactElement | null;
/**
 * Render the add field icon button
 * Shows a "+" icon below a field to add a new field after it
 * This is used by control_add_elements in icons_behaviour
 */
export declare function CollabFormAddFieldIcon({ field_id, on_click, disabled, className, variant, }: CollabFormAddFieldIconProps): React.ReactElement | null;
//# sourceMappingURL=hazo_collab_form_base.d.ts.map