import * as i0 from '@angular/core';
import { viewChild, input, EventEmitter, computed, signal, inject, effect, HostBinding, Output, ChangeDetectionStrategy, Component } from '@angular/core';
import * as i1 from '@angular/forms';
import { Validators, NgControl, FormsModule } from '@angular/forms';
import { FieldValidation } from '@masterteam/components/field-validation';
import { isInvalid } from '@masterteam/components';
import { Tooltip } from '@masterteam/components/tooltip';
import { Icon } from '@masterteam/icons';
import { TreeSelect } from 'primeng/treeselect';

class TreeSelectField {
    treeSelect = viewChild('treeSelect', ...(ngDevMode ? [{ debugName: "treeSelect" }] : /* istanbul ignore next */ []));
    field = input(true, ...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
    hint = input(...(ngDevMode ? [undefined, { debugName: "hint" }] : /* istanbul ignore next */ []));
    label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
    placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
    class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
    readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
    required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
    pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : /* istanbul ignore next */ []));
    options = input(undefined, ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
    selectionMode = input('single', ...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
    display = input('comma', ...(ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []));
    scrollHeight = input('20rem', ...(ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
    panelStyleClass = input(undefined, ...(ngDevMode ? [{ debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
    containerStyleClass = input(undefined, ...(ngDevMode ? [{ debugName: "containerStyleClass" }] : /* istanbul ignore next */ []));
    overlayOptions = input(undefined, ...(ngDevMode ? [{ debugName: "overlayOptions" }] : /* istanbul ignore next */ []));
    filter = input(false, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
    filterBy = input('label', ...(ngDevMode ? [{ debugName: "filterBy" }] : /* istanbul ignore next */ []));
    filterMode = input('lenient', ...(ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []));
    filterPlaceholder = input(undefined, ...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
    filterLocale = input(undefined, ...(ngDevMode ? [{ debugName: "filterLocale" }] : /* istanbul ignore next */ []));
    filterInputAutoFocus = input(false, ...(ngDevMode ? [{ debugName: "filterInputAutoFocus" }] : /* istanbul ignore next */ []));
    showClear = input(false, ...(ngDevMode ? [{ debugName: "showClear" }] : /* istanbul ignore next */ []));
    resetFilterOnHide = input(true, ...(ngDevMode ? [{ debugName: "resetFilterOnHide" }] : /* istanbul ignore next */ []));
    propagateSelectionDown = input(true, ...(ngDevMode ? [{ debugName: "propagateSelectionDown" }] : /* istanbul ignore next */ []));
    propagateSelectionUp = input(true, ...(ngDevMode ? [{ debugName: "propagateSelectionUp" }] : /* istanbul ignore next */ []));
    virtualScroll = input(undefined, ...(ngDevMode ? [{ debugName: "virtualScroll" }] : /* istanbul ignore next */ []));
    virtualScrollItemSize = input(undefined, ...(ngDevMode ? [{ debugName: "virtualScrollItemSize" }] : /* istanbul ignore next */ []));
    loading = input(undefined, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
    loadingMode = input('mask', ...(ngDevMode ? [{ debugName: "loadingMode" }] : /* istanbul ignore next */ []));
    size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
    variant = input(undefined, ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
    fluid = input(true, ...(ngDevMode ? [{ debugName: "fluid" }] : /* istanbul ignore next */ []));
    appendTo = input('body', ...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
    selectedLabelPath = input('data.pathLabel', ...(ngDevMode ? [{ debugName: "selectedLabelPath" }] : /* istanbul ignore next */ []));
    onChange = new EventEmitter();
    get hostClass() {
        return ['grid gap-1', this.class()].filter(Boolean).join(' ');
    }
    inputId = computed(() => {
        const name = this.ngControl?.name;
        return name ? name.toString() : this.label() || undefined;
    }, ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
    resolvedValue = computed(() => this.resolveValue(this.value()), ...(ngDevMode ? [{ debugName: "resolvedValue" }] : /* istanbul ignore next */ []));
    requiredValidator = Validators.required;
    value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
    disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
    isInvalid = isInvalid;
    onTouched = () => { };
    onModelChange = () => { };
    ngControl;
    constructor() {
        this.ngControl = inject(NgControl, { self: true, optional: true });
        if (this.ngControl) {
            this.ngControl.valueAccessor = this;
        }
        effect(() => {
            const control = this.ngControl?.control;
            if (control && this.required()) {
                control.addValidators(Validators.required);
                control.updateValueAndValidity();
            }
        });
        effect(() => {
            const treeSelect = this.treeSelect();
            const pInputs = this.pInputs();
            if (treeSelect && pInputs) {
                Object.assign(treeSelect, pInputs);
            }
        });
    }
    openTreeSelect() {
        if (this.disabled() || this.readonly()) {
            return;
        }
        this.treeSelect()?.show();
    }
    onValueChange(value) {
        this.value.set(value);
        this.onModelChange(value);
        this.onChange.emit(value);
    }
    getSelectionDisplayLabel() {
        return this.readSelectionLabel(this.resolvedValue());
    }
    getContainerStyleClass() {
        const classes = [
            this.containerStyleClass(),
            this.isInvalid(this.ngControl?.control ?? null) ? 'p-invalid' : '',
        ].filter((styleClass) => !!styleClass);
        return classes.length > 0 ? classes.join(' ') : undefined;
    }
    writeValue(value) {
        this.value.set(value ?? null);
    }
    registerOnChange(fn) {
        this.onModelChange = fn;
    }
    registerOnTouched(fn) {
        this.onTouched = fn;
    }
    setDisabledState(disabled) {
        this.disabled.set(disabled);
    }
    resolveValue(value) {
        if (value === null || value === undefined || value === '') {
            return null;
        }
        if (Array.isArray(value)) {
            return value.map((item) => this.resolveSingleValue(item) ?? item);
        }
        if (this.isSelectionMap(value)) {
            return value;
        }
        return this.resolveSingleValue(value) ?? value;
    }
    resolveSingleValue(value) {
        const key = this.getTreeNodeKey(value);
        if (!key) {
            return null;
        }
        return this.findTreeNode(this.options(), key);
    }
    readSelectionLabel(value) {
        if (value === null || value === undefined || value === '') {
            return null;
        }
        if (Array.isArray(value)) {
            return this.joinLabels(value.map((item) => this.readSelectionLabel(item)));
        }
        if (this.isSelectionMap(value)) {
            const labels = Object.entries(value)
                .filter(([, entry]) => this.isSelectionEntrySelected(entry))
                .map(([key]) => this.findTreeNode(this.options(), key))
                .map((node) => (node ? this.readNodeLabel(node) : null));
            return this.joinLabels(labels);
        }
        if (this.isTreeNodeValue(value)) {
            return this.readNodeLabel(value);
        }
        const node = this.resolveSingleValue(value);
        return node ? this.readNodeLabel(node) : String(value);
    }
    joinLabels(labels) {
        const visibleLabels = labels.filter((label) => !!label && label.trim().length > 0);
        return visibleLabels.length > 0 ? visibleLabels.join(', ') : null;
    }
    readNodeLabel(node) {
        const selectedLabelPath = this.selectedLabelPath();
        const configuredLabel = selectedLabelPath && this.resolveNestedValue(node, selectedLabelPath);
        if (typeof configuredLabel === 'string' &&
            configuredLabel.trim().length > 0) {
            return configuredLabel.trim();
        }
        if (typeof node.label === 'string' && node.label.trim().length > 0) {
            return node.label.trim();
        }
        return typeof node.key === 'string' && node.key.trim().length > 0
            ? node.key.trim()
            : null;
    }
    findTreeNode(nodes, key) {
        for (const node of nodes ?? []) {
            if (this.getTreeNodeKey(node) === key) {
                return node;
            }
            const match = this.findTreeNode(node.children, key);
            if (match) {
                return match;
            }
        }
        return null;
    }
    getTreeNodeKey(value) {
        if (typeof value === 'string' && value.trim().length > 0) {
            return value.trim();
        }
        if (!value || typeof value !== 'object' || Array.isArray(value)) {
            return null;
        }
        const record = value;
        const key = record['key'];
        if (typeof key === 'string' && key.trim().length > 0) {
            return key.trim();
        }
        const data = record['data'];
        if (data && typeof data === 'object' && !Array.isArray(data)) {
            const pathKey = data['pathKey'];
            if (typeof pathKey === 'string' && pathKey.trim().length > 0) {
                return pathKey.trim();
            }
        }
        return null;
    }
    isTreeNodeValue(value) {
        if (!value || typeof value !== 'object' || Array.isArray(value)) {
            return false;
        }
        const record = value;
        return ('label' in record ||
            'data' in record ||
            'children' in record ||
            'key' in record);
    }
    isSelectionMap(value) {
        if (!value || typeof value !== 'object' || Array.isArray(value)) {
            return false;
        }
        if (this.isTreeNodeValue(value)) {
            return false;
        }
        return Object.values(value).some((entry) => this.isSelectionEntrySelected(entry));
    }
    isSelectionEntrySelected(entry) {
        if (entry === true) {
            return true;
        }
        if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
            return false;
        }
        return entry['checked'] === true;
    }
    resolveNestedValue(value, path) {
        if (!path.includes('.')) {
            return value && typeof value === 'object'
                ? value[path]
                : undefined;
        }
        return path.split('.').reduce((current, key) => {
            if (!current || typeof current !== 'object') {
                return undefined;
            }
            return current[key];
        }, value);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TreeSelectField, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TreeSelectField, isStandalone: true, selector: "mt-treeselect-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, containerStyleClass: { classPropertyName: "containerStyleClass", publicName: "containerStyleClass", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, filterInputAutoFocus: { classPropertyName: "filterInputAutoFocus", publicName: "filterInputAutoFocus", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingMode: { classPropertyName: "loadingMode", publicName: "loadingMode", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, selectedLabelPath: { classPropertyName: "selectedLabelPath", publicName: "selectedLabelPath", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class": "this.hostClass" } }, viewQueries: [{ propertyName: "treeSelect", first: true, predicate: ["treeSelect"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (label() || hint()) {\r\n  <div class=\"flex items-center gap-1\">\r\n    @if (label()) {\r\n      <label\r\n        (click)=\"openTreeSelect()\"\r\n        [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n        [for]=\"inputId()\"\r\n        >{{ label() }}</label\r\n      >\r\n    }\r\n    @if (hint()) {\r\n      <span\r\n        class=\"inline-flex text-surface-400\"\r\n        [mtTooltip]=\"hint()\"\r\n        tooltipPosition=\"top\"\r\n      >\r\n        <mt-icon icon=\"general.help-circle\" />\r\n      </span>\r\n    }\r\n  </div>\r\n}\r\n\r\n<p-treeselect\r\n  #treeSelect\r\n  [ngModel]=\"resolvedValue()\"\r\n  (ngModelChange)=\"onValueChange($event)\"\r\n  (onBlur)=\"onTouched()\"\r\n  [disabled]=\"disabled() || readonly()\"\r\n  [inputId]=\"inputId()\"\r\n  [ariaLabel]=\"label() || placeholder() || undefined\"\r\n  [options]=\"options()\"\r\n  [placeholder]=\"placeholder() || label() || ''\"\r\n  [selectionMode]=\"selectionMode()\"\r\n  [display]=\"display()\"\r\n  [scrollHeight]=\"scrollHeight()\"\r\n  [panelStyleClass]=\"panelStyleClass()\"\r\n  [containerStyleClass]=\"getContainerStyleClass()\"\r\n  [overlayOptions]=\"overlayOptions()\"\r\n  [filter]=\"filter()\"\r\n  [filterBy]=\"filterBy()\"\r\n  [filterMode]=\"filterMode()\"\r\n  [filterPlaceholder]=\"filterPlaceholder()\"\r\n  [filterLocale]=\"filterLocale()\"\r\n  [filterInputAutoFocus]=\"filterInputAutoFocus()\"\r\n  [showClear]=\"showClear()\"\r\n  [resetFilterOnHide]=\"resetFilterOnHide()\"\r\n  [propagateSelectionDown]=\"propagateSelectionDown()\"\r\n  [propagateSelectionUp]=\"propagateSelectionUp()\"\r\n  [virtualScroll]=\"virtualScroll()\"\r\n  [virtualScrollItemSize]=\"virtualScrollItemSize()\"\r\n  [loading]=\"loading()\"\r\n  [loadingMode]=\"loadingMode()\"\r\n  [size]=\"size()\"\r\n  [variant]=\"variant()\"\r\n  [fluid]=\"fluid()\"\r\n  [appendTo]=\"appendTo()\"\r\n>\r\n  <ng-template #value>\r\n    @if (getSelectionDisplayLabel(); as selectedLabel) {\r\n      <span class=\"block truncate\">{{ selectedLabel }}</span>\r\n    } @else {\r\n      <span class=\"text-color-secondary\">{{\r\n        placeholder() || label() || \"\"\r\n      }}</span>\r\n    }\r\n  </ng-template>\r\n</p-treeselect>\r\n\r\n@if (ngControl && field()) {\r\n  <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\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: TreeSelect, selector: "p-treeSelect, p-treeselect, p-tree-select", inputs: ["inputId", "scrollHeight", "metaKeySelection", "display", "selectionMode", "tabindex", "ariaLabel", "ariaLabelledBy", "placeholder", "panelClass", "panelStyle", "panelStyleClass", "containerStyle", "containerStyleClass", "labelStyle", "labelStyleClass", "overlayOptions", "emptyMessage", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filterInputAutoFocus", "propagateSelectionDown", "propagateSelectionUp", "showClear", "resetFilterOnHide", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autofocus", "options", "loading", "loadingMode", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onNodeExpand", "onNodeCollapse", "onShow", "onHide", "onClear", "onFilter", "onFocus", "onBlur", "onNodeUnselect", "onNodeSelect"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TreeSelectField, decorators: [{
            type: Component,
            args: [{ selector: 'mt-treeselect-field', standalone: true, imports: [FormsModule, TreeSelect, FieldValidation, Tooltip, Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (label() || hint()) {\r\n  <div class=\"flex items-center gap-1\">\r\n    @if (label()) {\r\n      <label\r\n        (click)=\"openTreeSelect()\"\r\n        [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n        [for]=\"inputId()\"\r\n        >{{ label() }}</label\r\n      >\r\n    }\r\n    @if (hint()) {\r\n      <span\r\n        class=\"inline-flex text-surface-400\"\r\n        [mtTooltip]=\"hint()\"\r\n        tooltipPosition=\"top\"\r\n      >\r\n        <mt-icon icon=\"general.help-circle\" />\r\n      </span>\r\n    }\r\n  </div>\r\n}\r\n\r\n<p-treeselect\r\n  #treeSelect\r\n  [ngModel]=\"resolvedValue()\"\r\n  (ngModelChange)=\"onValueChange($event)\"\r\n  (onBlur)=\"onTouched()\"\r\n  [disabled]=\"disabled() || readonly()\"\r\n  [inputId]=\"inputId()\"\r\n  [ariaLabel]=\"label() || placeholder() || undefined\"\r\n  [options]=\"options()\"\r\n  [placeholder]=\"placeholder() || label() || ''\"\r\n  [selectionMode]=\"selectionMode()\"\r\n  [display]=\"display()\"\r\n  [scrollHeight]=\"scrollHeight()\"\r\n  [panelStyleClass]=\"panelStyleClass()\"\r\n  [containerStyleClass]=\"getContainerStyleClass()\"\r\n  [overlayOptions]=\"overlayOptions()\"\r\n  [filter]=\"filter()\"\r\n  [filterBy]=\"filterBy()\"\r\n  [filterMode]=\"filterMode()\"\r\n  [filterPlaceholder]=\"filterPlaceholder()\"\r\n  [filterLocale]=\"filterLocale()\"\r\n  [filterInputAutoFocus]=\"filterInputAutoFocus()\"\r\n  [showClear]=\"showClear()\"\r\n  [resetFilterOnHide]=\"resetFilterOnHide()\"\r\n  [propagateSelectionDown]=\"propagateSelectionDown()\"\r\n  [propagateSelectionUp]=\"propagateSelectionUp()\"\r\n  [virtualScroll]=\"virtualScroll()\"\r\n  [virtualScrollItemSize]=\"virtualScrollItemSize()\"\r\n  [loading]=\"loading()\"\r\n  [loadingMode]=\"loadingMode()\"\r\n  [size]=\"size()\"\r\n  [variant]=\"variant()\"\r\n  [fluid]=\"fluid()\"\r\n  [appendTo]=\"appendTo()\"\r\n>\r\n  <ng-template #value>\r\n    @if (getSelectionDisplayLabel(); as selectedLabel) {\r\n      <span class=\"block truncate\">{{ selectedLabel }}</span>\r\n    } @else {\r\n      <span class=\"text-color-secondary\">{{\r\n        placeholder() || label() || \"\"\r\n      }}</span>\r\n    }\r\n  </ng-template>\r\n</p-treeselect>\r\n\r\n@if (ngControl && field()) {\r\n  <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n" }]
        }], ctorParameters: () => [], propDecorators: { treeSelect: [{ type: i0.ViewChild, args: ['treeSelect', { isSignal: true }] }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], containerStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "containerStyleClass", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], filterInputAutoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterInputAutoFocus", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], propagateSelectionDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionDown", required: false }] }], propagateSelectionUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionUp", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMode", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], selectedLabelPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedLabelPath", required: false }] }], onChange: [{
                type: Output
            }], hostClass: [{
                type: HostBinding,
                args: ['class']
            }] } });

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

export { TreeSelectField };
//# sourceMappingURL=masterteam-components-treeselect-field.mjs.map
