import { JsonGroup, ImmutableTree } from '@react-awesome-query-builder/ui'; type AlertQueryCombinator = "AND" | "OR"; type AlertQueryOperator = "equal" | "less" | "less_or_equal" | "greater" | "greater_or_equal"; type AlertQueryFieldType = "number" | "boolean"; type ContactAlertSeverity = "HEALTHY" | "WATCH" | "NEED_ACTION"; declare enum AlertSharingType { PRIVATE = "PRIVATE", COMPANY = "COMPANY" } interface AlertQueryField { key: string; label: string; type: AlertQueryFieldType; /** "dollar" = prefix "$", "percent" = suffix "%" */ unit?: "dollar" | "percent"; /** Allowed operators (defaults to all numeric operators). */ operators?: AlertQueryOperator[]; /** Lower bound for numeric value (inclusive). Enforced at input time. */ min?: number; /** Upper bound for numeric value (inclusive). Enforced at input time. */ max?: number; } interface ContactAlertQueryBuilderProps { /** Current ImmutableTree state — fully controlled. */ value: ImmutableTree; onChange: (newTree: ImmutableTree) => void; fields?: AlertQueryField[]; className?: string; } interface ContactAlertDialogProps { open: boolean; onOpenChange: (open: boolean) => void; mode?: "create" | "edit"; initialName?: string; initialSeverity?: ContactAlertSeverity; /** Initial query in JsonGroup format (array children1). Converted to ImmutableTree on open. */ initialQuery?: JsonGroup; /** Show "Share across company" checkbox for company admins. */ isCompanyAdmin?: boolean; initialShareAcrossCompany?: boolean; onSave: (data: { name: string; severity: ContactAlertSeverity; /** Backend-compatible ImmutableTree (filterSegment format). */ filterSegment: ImmutableTree; sharingType: AlertSharingType; }) => void; isLoading?: boolean; /** Fired when the underlying QB sanitizeTree throws while saving. */ onError?: (error: Error) => void; className?: string; } declare const ALERT_QUERY_FIELDS: AlertQueryField[]; /** Convert a JsonGroup to an ImmutableTree usable by the query builder. */ declare function createAlertTree(query?: JsonGroup | null): ImmutableTree; export { ALERT_QUERY_FIELDS as A, type ContactAlertDialogProps as C, type AlertQueryCombinator as a, type AlertQueryField as b, type AlertQueryFieldType as c, type AlertQueryOperator as d, AlertSharingType as e, type ContactAlertQueryBuilderProps as f, type ContactAlertSeverity as g, createAlertTree as h };