/**
 * Types for the HazoValidationRuleEditor component
 */
import type { ValidationRule, PromptEditorConfig, PromptVariable } from '../../types/validation.js';
import type { EditorTheme } from '../shared/editor_theme/types.js';
import type { UseValidationRulesReturn } from './hooks/use_validation_rules.js';
import type { FbResponseSet } from '../../types/fb_response_types.js';
/** Document type option for the dropdown */
export interface DocumentTypeOption {
    type_id: string;
    type_label: string;
    description?: string;
}
/** Active tab in the rule list sidebar */
export type RuleListTab = 'all' | 'enabled' | 'disabled';
/** Props for the HazoValidationRuleEditor component */
export interface HazoValidationRuleEditorProps {
    /** Override the hazo_connect API endpoint */
    api_base_url?: string;
    /** Override the database table name */
    table_name?: string;
    /** Scope filter for multi-tenant setups */
    scope_id?: string | null;
    /** Additional CSS class */
    className?: string;
    /** Editor theme overrides */
    theme?: Partial<EditorTheme>;
    /** Prompt editor commands/variables config */
    prompt_config?: PromptEditorConfig;
    /**
     * Optional list of form-field variables (e.g. `@tenant_start_date`, `@loan_end_date`).
     * Merged into `prompt_config.variables` so they appear in the @-popup alongside session variables.
     * Use this to surface form fields that periodic_coverage rules can reference for period bounds.
     */
    form_field_variables?: PromptVariable[];
    /** Read-only mode */
    read_only?: boolean;
    /** Available document types for the dropdown. When provided, renders a select instead of text input. */
    available_document_types?: DocumentTypeOption[];
    /** Available response sets for the clarification tab dropdown. */
    available_response_sets?: FbResponseSet[];
    /**
     * Enable two-tier admin mode. When true AND scope_id is set, the data hook
     * issues two parallel fetches — globals (scope_id IS NULL) and overrides
     * (scope_id = scope_id) — and merges them by rule_id (override wins).
     * Globals render read-only with an "Override default" action.
     * When false (default) or when scope_id is null/undefined, behaviour is unchanged.
     */
    include_globals?: boolean;
    /**
     * Required when include_globals is true AND scope_id is set.
     * Called when the user clicks "Override default" on a global rule.
     * Consumer is responsible for persisting (typically a POST to its
     * /clone-to-override endpoint) and returning the newly-created override row.
     */
    on_clone_to_override?: (global_rule: ValidationRule) => Promise<ValidationRule | null>;
}
/** Context value for the validation rule editor */
export interface ValidationRuleEditorContextValue {
    /** CRUD hook return */
    rules_data: UseValidationRulesReturn;
    /** Currently selected rule ID */
    selected_id: string | null;
    /** Set the selected rule ID */
    set_selected_id: (id: string | null) => void;
    /** Document type filter for sidebar */
    type_filter: string | null;
    /** Set the document type filter */
    set_type_filter: (type: string | null) => void;
    /** Search query for filtering */
    search_query: string;
    /** Set the search query */
    set_search_query: (query: string) => void;
    /** Active tab in sidebar */
    active_tab: RuleListTab;
    /** Set active tab */
    set_active_tab: (tab: RuleListTab) => void;
    /** Filtered rules based on current filters */
    filtered_rules: ValidationRule[];
    /** Prompt editor configuration */
    prompt_config: PromptEditorConfig;
    /** Read-only mode */
    read_only: boolean;
    /** Available document types for dropdown */
    available_document_types: DocumentTypeOption[];
    /** Available response sets for clarification dropdown */
    available_response_sets: FbResponseSet[];
}
//# sourceMappingURL=types.d.ts.map