import * as _angular_core from '@angular/core';
import { ControlValueAccessor, AbstractControl, ValidationErrors } from '@angular/forms';
import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { SelectField } from '@masterteam/components/select-field';
import { TextField } from '@masterteam/components/text-field';

interface FormulaBuilderProperty {
    key: string;
    name: string;
    dataType: string;
}
declare class FormulaBuilder implements ControlValueAccessor {
    hideTitle: _angular_core.InputSignalWithTransform<boolean, unknown>;
    properties: _angular_core.InputSignal<FormulaBuilderProperty[]>;
    validationUrl: _angular_core.InputSignal<string | undefined>;
    httpClient: HttpClient;
    protected readonly functions: any[];
    selectedLookup: _angular_core.WritableSignal<any>;
    formula: _angular_core.WritableSignal<any[]>;
    disabled: _angular_core.WritableSignal<boolean>;
    touched: _angular_core.WritableSignal<boolean>;
    types: {
        function: {
            bg: string;
            border: string;
        };
        value: {
            bg: string;
            border: string;
        };
        field: {
            bg: string;
            border: string;
        };
        operator: {
            bg: string;
            border: string;
        };
    };
    operators: {
        key: string;
        name: string;
        type: string;
    }[];
    formulaText: _angular_core.Signal<string>;
    onChange(_formula: string): void;
    onTouched(): void;
    emitChange(): void;
    onAdd(item: any): void;
    onRemove(index: number): void;
    onAddProperty(property: any, dropdown: SelectField): void;
    onAddValue(el: TextField): void;
    onAddFunction(func: any, dropdown: SelectField): void;
    writeValue(formulaString: string): void;
    registerOnChange(onChange: any): void;
    registerOnTouched(onTouched: any): void;
    setDisabledState(isDisabled: boolean): void;
    markAsTouched(): void;
    validate(control: AbstractControl): Observable<ValidationErrors | null>;
    drop(event: CdkDragDrop<any[]>): void;
    parseStringToItems(strValue: string): any[];
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaBuilder, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaBuilder, "mt-formula-builder", never, { "hideTitle": { "alias": "hideTitle"; "required": false; "isSignal": true; }; "properties": { "alias": "properties"; "required": false; "isSignal": true; }; "validationUrl": { "alias": "validationUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

export { FormulaBuilder };
export type { FormulaBuilderProperty };
