import type { JSONSchema } from '../schema-context';
import { type Signal } from '@tempots/dom';
/**
 * Visibility condition configuration
 */
export interface VisibilityCondition {
    /** Field path to watch (relative to current context) */
    field: string;
    /** Comparison operator */
    operator: 'equals' | 'notEquals' | 'truthy' | 'falsy' | 'contains' | 'notContains' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'in' | 'notIn';
    /** Value to compare against (not needed for truthy/falsy) */
    value?: unknown;
    /** Multiple values for 'in'/'notIn' operators */
    values?: unknown[];
}
/**
 * Complex visibility expression
 */
export interface VisibilityExpression {
    /** Logical operator */
    operator: 'and' | 'or' | 'not';
    /** Child conditions or expressions */
    conditions: (VisibilityCondition | VisibilityExpression)[];
}
/**
 * Visibility configuration from x:ui
 */
export type VisibilityConfig = VisibilityCondition | VisibilityExpression | string;
/**
 * Extract visibility configuration from schema x:ui
 */
export declare function getVisibilityConfig(schema: JSONSchema): VisibilityConfig | undefined;
/**
 * Evaluate visibility configuration against form data
 */
export declare function evaluateVisibility(config: VisibilityConfig, formData: unknown): boolean;
/**
 * Create a reactive visibility signal based on form data
 */
export declare function createVisibilitySignal(config: VisibilityConfig, formDataSignal: Signal<unknown>): Signal<boolean>;
/**
 * Get all field paths referenced in a visibility configuration
 */
export declare function getReferencedFields(config: VisibilityConfig): string[];
/**
 * Helper to create common visibility conditions
 */
export declare const VisibilityConditions: {
    /**
     * Field equals specific value
     */
    equals: (field: string, value: unknown) => VisibilityCondition;
    /**
     * Field is truthy
     */
    truthy: (field: string) => VisibilityCondition;
    /**
     * Field is falsy
     */
    falsy: (field: string) => VisibilityCondition;
    /**
     * Field value is in array
     */
    in: (field: string, values: unknown[]) => VisibilityCondition;
    /**
     * Combine conditions with AND
     */
    and: (...conditions: (VisibilityCondition | VisibilityExpression)[]) => VisibilityExpression;
    /**
     * Combine conditions with OR
     */
    or: (...conditions: (VisibilityCondition | VisibilityExpression)[]) => VisibilityExpression;
    /**
     * Negate condition
     */
    not: (condition: VisibilityCondition | VisibilityExpression) => VisibilityExpression;
};
