import * as i0 from '@angular/core';
import { input, booleanAttribute, inject, signal, computed, Component } from '@angular/core';
import * as i1 from '@angular/forms';
import { FormsModule } from '@angular/forms';
import * as i3 from '@angular/cdk/drag-drop';
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
import { Button } from '@masterteam/components/button';
import { InputTextModule } from 'primeng/inputtext';
import * as i2 from 'primeng/chip';
import { ChipModule } from 'primeng/chip';
import { HttpClient } from '@angular/common/http';
import { map, catchError, EMPTY, of } from 'rxjs';
import { SelectField } from '@masterteam/components/select-field';
import * as i4 from 'primeng/inputgroup';
import { InputGroupModule } from 'primeng/inputgroup';
import * as i5 from 'primeng/inputgroupaddon';
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
import { TextField } from '@masterteam/components/text-field';

const types = {
    function: {
        bg: 'var(--p-green-50)',
        border: 'var(--p-green-500)',
    },
    value: {
        bg: 'var(--p-purple-100)',
        border: 'var(--p-purple-500)',
    },
    field: {
        bg: 'var(--p-orange-50)',
        border: 'var(--p-orange-500)',
    },
    operator: {
        bg: 'var(--p-primary-50)',
        border: 'var(--p-primary-500)',
    },
};
const operators = [
    {
        key: '+',
        name: '+',
        type: 'operator',
    },
    {
        key: '-',
        name: '-',
        type: 'operator',
    },
    {
        key: '*',
        name: '×',
        type: 'operator',
    },
    {
        key: '/',
        name: '÷',
        type: 'operator',
    },
    // {
    //   key: '==',
    //   name: '=',
    //   type: 'operator',
    // },
    // {
    //   key: '!=',
    //   name: '≠',
    //   type: 'operator',
    // },
    // {
    //   key: '<',
    //   name: '<',
    //   type: 'operator',
    // },
    // {
    //   key: '<=',
    //   name: '≤',
    //   type: 'operator',
    // },
    // {
    //   key: '>',
    //   name: '>',
    //   type: 'operator',
    // },
    // {
    //   key: '>=',
    //   name: '≥',
    //   type: 'operator',
    // },
    // {
    //   key: '||',
    //   name: '||',
    //   type: 'operator',
    // },
    // {
    //   key: '&&',
    //   name: '&&',
    //   type: 'operator',
    // },
    {
        key: '(',
        name: '(',
        type: 'operator',
    },
    {
        key: ')',
        name: ')',
        type: 'operator',
    },
    {
        key: ',',
        name: ',',
        type: 'operator',
    },
    {
        key: ';',
        name: ';',
        type: 'operator',
    },
];

class FormulaBuilder {
    hideTitle = input(false, { ...(ngDevMode ? { debugName: "hideTitle" } : {}), transform: booleanAttribute });
    properties = input([], ...(ngDevMode ? [{ debugName: "properties" }] : []));
    // validationUrl = input<string>('app/checkformula');
    validationUrl = input(...(ngDevMode ? [undefined, { debugName: "validationUrl" }] : []));
    httpClient = inject(HttpClient);
    // translateService: TranslateService = inject(TranslateService);
    // functions = computed(() => []);
    functions = [
        {
            // name: this.translateService.instant('formula-builder.count'),
            name: 'formula-builder.count',
            key: 'count',
            hint: '',
        },
        {
            // name: this.translateService.instant('formula-builder.sum'),
            name: 'formula-builder.sum',
            key: 'sum',
            hint: '',
        },
        {
            // name: this.translateService.instant('formula-builder.average'),
            name: 'formula-builder.average',
            key: 'average',
            hint: '',
        },
        {
            // name: this.translateService.instant('formula-builder.count-value'),
            name: 'formula-builder.count-value',
            key: 'countvalue',
            // hint: this.translateService.instant('formula-builder.count-value-hint'),
            hint: 'formula-builder.count-value-hint',
        },
        {
            // name: this.translateService.instant('formula-builder.average-count'),
            name: 'formula-builder.average-count',
            key: 'averagecount',
            // hint: this.translateService.instant('formula-builder.average-count-hint'),
            hint: 'formula-builder.average-count-hint',
        },
        {
            // name: this.translateService.instant('formula-builder.mode'),
            name: 'formula-builder.mode',
            key: 'mode',
            // hint: this.translateService.instant('formula-builder.mode-hint'),
            hint: 'formula-builder.mode-hint',
        },
        {
            // name: this.translateService.instant('formula-builder.median'),
            name: 'formula-builder.median',
            key: 'median',
            // hint: this.translateService.instant('formula-builder.median-hint'),
            hint: 'formula-builder.median-hint',
        },
        {
            // name: this.translateService.instant('formula-builder.standard-deviation'),
            name: 'formula-builder.standard-deviation',
            key: 'stddev',
            hint: '',
        },
        {
            // name: this.translateService.instant('formula-builder.min-max'),
            name: 'formula-builder.min-max',
            key: 'range',
            // hint: this.translateService.instant('formula-builder.min-max-hint'),
            hint: 'formula-builder.min-max-hint',
        },
    ];
    selectedLookup = signal(null, ...(ngDevMode ? [{ debugName: "selectedLookup" }] : []));
    formula = signal([], ...(ngDevMode ? [{ debugName: "formula" }] : []));
    disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
    touched = signal(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
    types = types;
    operators = operators;
    formulaText = computed(() => {
        return '';
    }, ...(ngDevMode ? [{ debugName: "formulaText" }] : []));
    onChange(_formula) { }
    onTouched() { }
    emitChange() {
        const str = this.formula()
            .map((x) => x.key)
            .join(' ');
        this.onChange(str);
    }
    onAdd(item) {
        this.markAsTouched();
        if (!this.disabled()) {
            this.formula.update((formula) => [...formula, item]);
            this.emitChange();
        }
    }
    onRemove(index) {
        this.markAsTouched();
        if (!this.disabled()) {
            this.formula.update((formula) => {
                formula.splice(index, 1);
                return formula;
            });
            this.emitChange();
        }
    }
    onAddProperty(property, dropdown) {
        if (!property?.key)
            return;
        this.onAdd({
            key: property.key,
            name: property.name,
            type: 'field',
            dataType: property?.dataType,
        });
        // TODO: fix input clearing
        dropdown?.clearSelection();
        this.selectedLookup.set(null);
    }
    onAddValue(el) {
        this.onAdd({
            key: el.value(),
            name: el.value(),
            type: 'value',
        });
        el.value.set('');
    }
    onAddFunction(func, dropdown) {
        if (!func?.key)
            return;
        this.onAdd({
            key: func.key,
            name: func.name,
            type: 'function',
        });
        dropdown?.clearSelection();
    }
    writeValue(formulaString) {
        if (formulaString) {
            this.formula.set(this.parseStringToItems(formulaString));
        }
    }
    registerOnChange(onChange) {
        this.onChange = onChange;
    }
    registerOnTouched(onTouched) {
        this.onTouched = onTouched;
    }
    setDisabledState(isDisabled) {
        this.disabled.set(isDisabled);
    }
    markAsTouched() {
        if (!this.touched()) {
            this.onTouched();
            this.touched.set(true);
        }
    }
    validate(control) {
        const formula = control.value;
        if (this.validationUrl()) {
            const res$ = this.httpClient.post(this.validationUrl(), {
                formula,
            });
            return res$.pipe(map(({ data }) => {
                return data ? null : { mustBeValidFormula: formula };
            }), catchError(() => {
                return EMPTY;
            }));
        }
        else {
            return of(null);
        }
    }
    drop(event) {
        this.formula.update((formula) => {
            moveItemInArray(formula, event.previousIndex, event.currentIndex);
            return formula;
        });
    }
    parseStringToItems(strValue) {
        if (!strValue || !strValue.trim())
            return [];
        const tokens = strValue.split(/\s+/);
        const results = [];
        tokens.forEach((token) => {
            let found = this.operators.find((el) => el.key === token);
            if (found) {
                results.push(found);
                return;
            }
            found = this.functions.find((el) => el.key === token);
            if (found) {
                results.push({
                    key: token,
                    name: found.name,
                    type: 'function',
                });
                return;
            }
            found = this.properties().find((el) => el.key === token);
            if (found) {
                results.push({
                    key: token,
                    name: found.name,
                    type: 'field',
                });
                return;
            }
            results.push({
                key: token,
                name: token,
                type: 'value',
            });
        });
        return results;
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormulaBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: FormulaBuilder, isStandalone: true, selector: "mt-formula-builder", inputs: { hideTitle: { classPropertyName: "hideTitle", publicName: "hideTitle", isSignal: true, isRequired: false, transformFunction: null }, properties: { classPropertyName: "properties", publicName: "properties", isSignal: true, isRequired: false, transformFunction: null }, validationUrl: { classPropertyName: "validationUrl", publicName: "validationUrl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"@container w-full flex flex-col gap-2\">\n  @if (!hideTitle()) {\n    <h6 class=\"m-0\" translate>formula-builder.formula-builder</h6>\n  }\n  @if (!disabled()) {\n    <div class=\"grid grid-cols-6 gap-2\">\n      @if (properties()?.length) {\n        <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n          <mt-select-field\n            #propertyDropdown=\"\"\n            (onChange)=\"onAddProperty($event, propertyDropdown)\"\n            label=\"formula-builder.property\"\n            selectId=\"-1\"\n            placeholder=\"{{ 'formula-builder.select-property' }}\"\n            styleClass=\"w-full\"\n            [filter]=\"true\"\n            filterBy=\"name\"\n            [ngModel]=\"null\"\n            [options]=\"properties()\"\n            optionLabel=\"name\"\n            dataKey=\"key\"\n            appendTo=\"body\"\n          ></mt-select-field>\n        </div>\n      }\n      @if (functions?.length) {\n        <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n          <mt-select-field\n            #functionDropdown=\"\"\n            label=\"formula-builder.function\"\n            (onChange)=\"onAddFunction($event, functionDropdown)\"\n            selectId=\"-1\"\n            placeholder=\"{{ 'formula-builder.select-function' }}\"\n            styleClass=\"w-full\"\n            [filter]=\"true\"\n            filterBy=\"name\"\n            [ngModel]=\"null\"\n            [options]=\"functions\"\n            optionLabel=\"name\"\n            dataKey=\"key\"\n            appendTo=\"body\"\n          ></mt-select-field>\n        </div>\n      }\n      <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n        <label for=\"configuration\" translate>formula-builder.operators</label>\n        <div dir=\"ltr\" class=\"flex flex-wrap gap-1\">\n          @for (operator of operators; track operator) {\n            <mt-button\n              type=\"button\"\n              [outlined]=\"true\"\n              [label]=\"operator.name\"\n              (click)=\"onAdd(operator)\"\n            >\n            </mt-button>\n          }\n        </div>\n      </div>\n      <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n        <label for=\"configuration\" translate\n          >formula-builder.custom-value</label\n        >\n        <p-input-group>\n          <mt-text-field\n            #customInput\n            type=\"text\"\n            [field]=\"false\"\n            [placeholder]=\"'formula-builder.custom-value'\"\n            style=\"width: 100%\"\n          ></mt-text-field>\n          <p-inputgroup-addon>\n            <mt-button\n              class=\"\"\n              type=\"button\"\n              (click)=\"onAddValue(customInput)\"\n              [disabled]=\"disabled() || !customInput.value()\"\n              label=\"\"\n              icon=\"general.plus\"\n            ></mt-button>\n          </p-inputgroup-addon>\n        </p-input-group>\n      </div>\n    </div>\n  }\n  <div>\n    <label for=\"configuration\" translate>formula-builder.formula</label>\n    <div\n      dir=\"ltr\"\n      cdkDropList=\"\"\n      cdkDropListOrientation=\"mixed\"\n      [cdkDropListData]=\"formula()\"\n      (cdkDropListDropped)=\"drop($event)\"\n      [cdkDropListDisabled]=\"disabled()\"\n      class=\"flex flex-wrap gap-1 rounded-lg border-1 border-gray-500 bg-gray-50 p-2 formula-preview\"\n    >\n      @for (item of formula(); track item; let i = $index) {\n        <p-chip\n          [style]=\"{\n            background: types[item.type]?.bg ?? 'var(--p-gary-50)',\n            borderColor: types[item.type]?.border ?? 'var(--p-gary-500)',\n          }\"\n          styleClass=\"text-black-alpha-90 border-1 border-round cursor-grab\"\n          [label]=\"item.name\"\n          [removable]=\"!disabled()\"\n          (onRemove)=\"onRemove(i)\"\n          [cdkDragDisabled]=\"disabled()\"\n          cdkDrag=\"\"\n        ></p-chip>\n      }\n    </div>\n  </div>\n</div>\n", styles: [":host .formula-preview{border-color:var(--p-gray-500);min-height:60px}:host.ng-valid .formula-preview{border-color:var(--p-green-500)}:host.ng-invalid .formula-preview{border-color:var(--p-red-500)}:host ::ng-deep .cdk-drop-list{display:flex}:host ::ng-deep .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;z-index:1000}:host ::ng-deep .cdk-drag-placeholder{opacity:.5}:host ::ng-deep .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .formula-preview.cdk-drop-list-dragging .formula-preview:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .p-inputgroupaddon:first-child .p-inputtext,::ng-deep .p-inputgroup>mt-text-field:first-child .p-inputtext{height:100%;width:100%;border-radius:0;border-start-start-radius:var(--p-inputgroup-addon-border-radius);border-end-start-radius:var(--p-inputgroup-addon-border-radius)}::ng-deep .p-inputgroupaddon:first-child,::ng-deep .p-inputgroup>p-autocomplete:first-child{width:100%}::ng-deep .p-inputgroupaddon:first-child>div,::ng-deep .p-inputgroup>p-autocomplete:first-child>div{width:100%;height:100%}::ng-deep .p-inputgroupaddon:first-child>div ul,::ng-deep .p-inputgroup>p-autocomplete:first-child>div ul{border-radius:0;border-start-start-radius:var(--p-inputgroup-addon-border-radius);border-end-start-radius:var(--p-inputgroup-addon-border-radius)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "optionGroupLabel", "optionGroupChildren", "loading"], outputs: ["onChange"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ChipModule }, { kind: "component", type: i2.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "styleClass", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: 
                // TranslateModule,
                DragDropModule }, { kind: "directive", type: i3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i4.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i5.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "icon", "iconPosition"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: FormulaBuilder, decorators: [{
            type: Component,
            args: [{ selector: 'mt-formula-builder', standalone: true, imports: [
                        FormsModule,
                        SelectField,
                        InputTextModule,
                        Button,
                        ChipModule,
                        // TranslateModule,
                        DragDropModule,
                        InputGroupModule,
                        InputGroupAddonModule,
                        TextField,
                    ], template: "<div class=\"@container w-full flex flex-col gap-2\">\n  @if (!hideTitle()) {\n    <h6 class=\"m-0\" translate>formula-builder.formula-builder</h6>\n  }\n  @if (!disabled()) {\n    <div class=\"grid grid-cols-6 gap-2\">\n      @if (properties()?.length) {\n        <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n          <mt-select-field\n            #propertyDropdown=\"\"\n            (onChange)=\"onAddProperty($event, propertyDropdown)\"\n            label=\"formula-builder.property\"\n            selectId=\"-1\"\n            placeholder=\"{{ 'formula-builder.select-property' }}\"\n            styleClass=\"w-full\"\n            [filter]=\"true\"\n            filterBy=\"name\"\n            [ngModel]=\"null\"\n            [options]=\"properties()\"\n            optionLabel=\"name\"\n            dataKey=\"key\"\n            appendTo=\"body\"\n          ></mt-select-field>\n        </div>\n      }\n      @if (functions?.length) {\n        <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n          <mt-select-field\n            #functionDropdown=\"\"\n            label=\"formula-builder.function\"\n            (onChange)=\"onAddFunction($event, functionDropdown)\"\n            selectId=\"-1\"\n            placeholder=\"{{ 'formula-builder.select-function' }}\"\n            styleClass=\"w-full\"\n            [filter]=\"true\"\n            filterBy=\"name\"\n            [ngModel]=\"null\"\n            [options]=\"functions\"\n            optionLabel=\"name\"\n            dataKey=\"key\"\n            appendTo=\"body\"\n          ></mt-select-field>\n        </div>\n      }\n      <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n        <label for=\"configuration\" translate>formula-builder.operators</label>\n        <div dir=\"ltr\" class=\"flex flex-wrap gap-1\">\n          @for (operator of operators; track operator) {\n            <mt-button\n              type=\"button\"\n              [outlined]=\"true\"\n              [label]=\"operator.name\"\n              (click)=\"onAdd(operator)\"\n            >\n            </mt-button>\n          }\n        </div>\n      </div>\n      <div class=\"col-span-6 @md:col-span-3 @2xl:col-span-2\">\n        <label for=\"configuration\" translate\n          >formula-builder.custom-value</label\n        >\n        <p-input-group>\n          <mt-text-field\n            #customInput\n            type=\"text\"\n            [field]=\"false\"\n            [placeholder]=\"'formula-builder.custom-value'\"\n            style=\"width: 100%\"\n          ></mt-text-field>\n          <p-inputgroup-addon>\n            <mt-button\n              class=\"\"\n              type=\"button\"\n              (click)=\"onAddValue(customInput)\"\n              [disabled]=\"disabled() || !customInput.value()\"\n              label=\"\"\n              icon=\"general.plus\"\n            ></mt-button>\n          </p-inputgroup-addon>\n        </p-input-group>\n      </div>\n    </div>\n  }\n  <div>\n    <label for=\"configuration\" translate>formula-builder.formula</label>\n    <div\n      dir=\"ltr\"\n      cdkDropList=\"\"\n      cdkDropListOrientation=\"mixed\"\n      [cdkDropListData]=\"formula()\"\n      (cdkDropListDropped)=\"drop($event)\"\n      [cdkDropListDisabled]=\"disabled()\"\n      class=\"flex flex-wrap gap-1 rounded-lg border-1 border-gray-500 bg-gray-50 p-2 formula-preview\"\n    >\n      @for (item of formula(); track item; let i = $index) {\n        <p-chip\n          [style]=\"{\n            background: types[item.type]?.bg ?? 'var(--p-gary-50)',\n            borderColor: types[item.type]?.border ?? 'var(--p-gary-500)',\n          }\"\n          styleClass=\"text-black-alpha-90 border-1 border-round cursor-grab\"\n          [label]=\"item.name\"\n          [removable]=\"!disabled()\"\n          (onRemove)=\"onRemove(i)\"\n          [cdkDragDisabled]=\"disabled()\"\n          cdkDrag=\"\"\n        ></p-chip>\n      }\n    </div>\n  </div>\n</div>\n", styles: [":host .formula-preview{border-color:var(--p-gray-500);min-height:60px}:host.ng-valid .formula-preview{border-color:var(--p-green-500)}:host.ng-invalid .formula-preview{border-color:var(--p-red-500)}:host ::ng-deep .cdk-drop-list{display:flex}:host ::ng-deep .cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f;z-index:1000}:host ::ng-deep .cdk-drag-placeholder{opacity:.5}:host ::ng-deep .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .formula-preview.cdk-drop-list-dragging .formula-preview:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .p-inputgroupaddon:first-child .p-inputtext,::ng-deep .p-inputgroup>mt-text-field:first-child .p-inputtext{height:100%;width:100%;border-radius:0;border-start-start-radius:var(--p-inputgroup-addon-border-radius);border-end-start-radius:var(--p-inputgroup-addon-border-radius)}::ng-deep .p-inputgroupaddon:first-child,::ng-deep .p-inputgroup>p-autocomplete:first-child{width:100%}::ng-deep .p-inputgroupaddon:first-child>div,::ng-deep .p-inputgroup>p-autocomplete:first-child>div{width:100%;height:100%}::ng-deep .p-inputgroupaddon:first-child>div ul,::ng-deep .p-inputgroup>p-autocomplete:first-child>div ul{border-radius:0;border-start-start-radius:var(--p-inputgroup-addon-border-radius);border-end-start-radius:var(--p-inputgroup-addon-border-radius)}\n"] }]
        }], propDecorators: { hideTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTitle", required: false }] }], properties: [{ type: i0.Input, args: [{ isSignal: true, alias: "properties", required: false }] }], validationUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationUrl", required: false }] }] } });

/**
 * Generated bundle index. Do not edit.
 */

export { FormulaBuilder };
//# sourceMappingURL=masterteam-components-formula-builder.mjs.map
