export interface SegmentationEnumValue {
    v: string;
    l: string;
}
export type SegmentationFieldType = "enum" | "number" | "date" | "text" | "tag-single" | "tag-multi";
export type SegmentationOperator = "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "between" | "before" | "after" | "in" | "notIn" | "isNull" | "isNotNull" | "withinLastDays" | "beforeDays";
export interface SegmentationField {
    value: string;
    label: string;
    category: string;
    type: SegmentationFieldType;
    icon?: string;
    enumValues?: SegmentationEnumValue[];
    operators: SegmentationOperator[];
}
export interface SegmentationTag {
    id: string;
    title: string;
}
export interface SegmentationRule {
    field: string;
    operator: SegmentationOperator;
    value?: string | number | string[] | number[] | (string | number)[];
}
export interface SegmentationGroup {
    operator: "AND" | "OR";
    rules: (SegmentationRule | SegmentationGroup)[];
}
export interface SegmentationFilter {
    filter: SegmentationGroup;
}
/**
 * Traducciones del builder. El componente es agnóstico al dominio:
 * sirve para segmentar/filtrar clientes, productos, registros, etc.
 * Adapta los textos según el contexto (p. ej. "Incluir los que cumplan").
 */
export interface SegmentationBuilderTranslations {
    /** Texto introductorio antes del operador (ej. "Incluir los que cumplan"). Sin referencias a dominio (clientes, productos). */
    includeItemsText?: string;
    allConditionsLabel?: string;
    anyConditionLabel?: string;
    theseConditionsText?: string;
    /** Singular, used when there is only one condition (e.g. "esta condición:") */
    thisConditionText?: string;
    nestedConditionsPrefix?: string;
    nestedConditionsSuffix?: string;
    addConditionLabel?: string;
    addGroupLabel?: string;
    selectPlaceholder?: string;
    selectTagPlaceholder?: string;
    selectTagsPlaceholder?: string;
    selectValuesPlaceholder?: string;
    searchPlaceholder?: string;
    selectedCountSingular?: string;
    selectedCountPlural?: string;
    deleteConditionTitle?: string;
    deleteGroupTitle?: string;
    automaticLabel?: string;
    fromPlaceholder?: string;
    toPlaceholder?: string;
    betweenSeparator?: string;
    daysPlaceholder?: string;
    valuePlaceholder?: string;
    textValuePlaceholder?: string;
    maxDepthWarning?: string;
    filterSummaryTitle?: string;
    /** Prefijo del resumen (ej. "Donde:", "Filtro:"). Genérico, sin dominio. */
    filterSummaryPrefix?: string;
    noConditionsText?: string;
    andConnectorLabel?: string;
    orConnectorLabel?: string;
    /** Botón para mostrar el JSON del filtro */
    showJsonLabel?: string;
    /** Botón para ocultar el JSON del filtro */
    hideJsonLabel?: string;
    operatorLabels?: Partial<Record<SegmentationOperator, string>>;
}
export interface SegmentationBuilderProps {
    /** Field definitions for the builder */
    fields: SegmentationField[];
    /** Available tags for tag-type fields */
    tags?: SegmentationTag[];
    /** Initial/controlled filter value */
    value?: SegmentationGroup;
    /** Called when the filter changes */
    onChange?: (filter: SegmentationGroup) => void;
    /** Max nesting depth for condition groups (default: 5) */
    maxDepth?: number;
    /** Show the filter summary section */
    showSummary?: boolean;
    /** Show the JSON preview section */
    showJsonPreview?: boolean;
    /** Translations for i18n */
    translations?: SegmentationBuilderTranslations;
    /** Additional CSS class */
    className?: string;
    /** Whether the builder is disabled */
    isDisabled?: boolean;
}
export interface RuleState {
    id: string;
    type: "rule";
    field: string;
    operator: SegmentationOperator;
    value?: string | number | string[] | number[] | (string | number)[];
}
export interface GroupState {
    id: string;
    type: "group";
    operator: "AND" | "OR";
    rules: (RuleState | GroupState)[];
}
export interface SegmentationBuilderRef {
    /** Get the current filter as JSON */
    getFilter: () => SegmentationGroup;
    /** Get the full payload (filter + metadata) */
    getPayload: () => SegmentationFilter;
    /** Reset the builder to initial state */
    reset: () => void;
}
export declare function isGroupState(item: RuleState | GroupState): item is GroupState;
export declare function isSegmentationGroup(item: SegmentationRule | SegmentationGroup): item is SegmentationGroup;
//# sourceMappingURL=SegmentationBuilder.types.d.ts.map