import * as i0 from '@angular/core';
import { inject, ChangeDetectorRef, input, EventEmitter, signal, effect, HostBinding, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
import * as i1 from '@angular/forms';
import { Validators, NgControl, FormsModule } from '@angular/forms';
import { Select } from 'primeng/select';
import { FieldValidation } from '@masterteam/components/field-validation';
import { isInvalid } from '@masterteam/components';
import * as i2 from '@jsverse/transloco';
import { TranslocoModule } from '@jsverse/transloco';
import { Avatar } from '@masterteam/components/avatar';

class SelectField {
    cdr = inject(ChangeDetectorRef);
    dropdown;
    field = input(true, ...(ngDevMode ? [{ debugName: "field" }] : []));
    label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
    placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
    hasPlaceholderPrefix = input(true, ...(ngDevMode ? [{ debugName: "hasPlaceholderPrefix" }] : []));
    class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
    readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : []));
    pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : []));
    options = input(undefined, ...(ngDevMode ? [{ debugName: "options" }] : []));
    optionValue = input(undefined, ...(ngDevMode ? [{ debugName: "optionValue" }] : []));
    optionLabel = input(undefined, ...(ngDevMode ? [{ debugName: "optionLabel" }] : []));
    filter = input(undefined, ...(ngDevMode ? [{ debugName: "filter" }] : []));
    filterBy = input(undefined, ...(ngDevMode ? [{ debugName: "filterBy" }] : []));
    dataKey = input(undefined, ...(ngDevMode ? [{ debugName: "dataKey" }] : []));
    showClear = input(undefined, ...(ngDevMode ? [{ debugName: "showClear" }] : []));
    clearAfterSelect = input(undefined, ...(ngDevMode ? [{ debugName: "clearAfterSelect" }] : []));
    required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : [])); // Add readonly required input
    group = input(false, ...(ngDevMode ? [{ debugName: "group" }] : []));
    size = input('', ...(ngDevMode ? [{ debugName: "size" }] : []));
    optionGroupLabel = input('label', ...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : []));
    optionGroupChildren = input('items', ...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : []));
    loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
    optionIcon = input('icon', ...(ngDevMode ? [{ debugName: "optionIcon" }] : []));
    optionIconColor = input('color', ...(ngDevMode ? [{ debugName: "optionIconColor" }] : []));
    optionIconShape = input('shape', ...(ngDevMode ? [{ debugName: "optionIconShape" }] : []));
    optionAvatarShape = input('square', ...(ngDevMode ? [{ debugName: "optionAvatarShape" }] : []));
    optionGroupIcon = input('icon', ...(ngDevMode ? [{ debugName: "optionGroupIcon" }] : []));
    optionGroupIconColor = input('color', ...(ngDevMode ? [{ debugName: "optionGroupIconColor" }] : []));
    optionGroupIconShape = input('shape', ...(ngDevMode ? [{ debugName: "optionGroupIconShape" }] : []));
    optionGroupAvatarShape = input('square', ...(ngDevMode ? [{ debugName: "optionGroupAvatarShape" }] : []));
    onChange = new EventEmitter();
    styleClass;
    requiredValidator = Validators.required;
    value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
    disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
    onTouched = () => { };
    onModelChange = () => { };
    ngControl = null;
    isInvalid = isInvalid;
    constructor() {
        try {
            this.ngControl = inject(NgControl, { self: true, optional: true });
            if (this.ngControl) {
                this.ngControl.valueAccessor = this;
            }
        }
        catch {
            this.ngControl = null;
        }
        effect(() => {
            if (this.ngControl?.control && this.required()) {
                this.ngControl.control.addValidators(Validators.required);
                this.ngControl.control.updateValueAndValidity();
            }
        });
    }
    applyInputsToDropdown() {
        // Object.assign(this.dropdown, this.pInputs());
    }
    ngOnInit() {
        this.styleClass = this.class();
        if (this.pInputs()) {
            this.applyInputsToDropdown();
        }
    }
    onValueChange(value) {
        this.onModelChange(value);
        this.value.set(value);
        this.onChange.emit(value);
        if (this.clearAfterSelect()) {
            this.clearSelection();
        }
    }
    ngOnChanges(changes) {
        if (changes['pInputs']) {
            this.applyInputsToDropdown();
        }
    }
    writeValue(value) {
        this.value.set(value);
    }
    registerOnChange(fn) {
        this.onModelChange = fn;
    }
    registerOnTouched(fn) {
        this.onTouched = fn;
    }
    setDisabledState(disabled) {
        this.disabled.set(disabled);
    }
    isGrouped() {
        return this.group();
    }
    // TODO: make this method work
    clearSelection() {
        this.dropdown.clear(this.value());
        this.dropdown.value = null;
        this.value.set(null);
        this.onModelChange(null);
        this.onChange.emit(null);
        this.cdr.detectChanges();
    }
    getOptionLabelValue(option) {
        const resolvedOption = this.resolveOption(option);
        if (resolvedOption == null)
            return '';
        const labelKey = this.optionLabel();
        if (labelKey && typeof resolvedOption === 'object') {
            return this.resolveNestedValue(resolvedOption, labelKey) ?? '';
        }
        return typeof resolvedOption === 'object'
            ? (resolvedOption.label ?? '')
            : String(resolvedOption);
    }
    getOptionIcon(option) {
        const resolvedOption = this.resolveOption(option);
        if (!resolvedOption || typeof resolvedOption !== 'object')
            return undefined;
        return resolvedOption[this.optionIcon()];
    }
    getOptionAvatarBackground(option) {
        return this.getAvatarBackgroundByColor(this.getOptionColor(option));
    }
    getOptionAvatarColor(option) {
        return this.getAvatarColorByColor(this.getOptionColor(option));
    }
    getOptionAvatarShape(option) {
        const resolvedOption = this.resolveOption(option);
        if (!resolvedOption || typeof resolvedOption !== 'object') {
            return this.normalizeAvatarShape(this.optionAvatarShape());
        }
        return this.normalizeAvatarShape(resolvedOption[this.optionIconShape()] ?? this.optionAvatarShape());
    }
    getGroupLabelValue(group) {
        if (group == null)
            return '';
        const groupLabelKey = this.optionGroupLabel();
        if (groupLabelKey && typeof group === 'object') {
            return group[groupLabelKey] ?? '';
        }
        return typeof group === 'object' ? (group.label ?? '') : String(group);
    }
    getGroupIcon(group) {
        if (!group || typeof group !== 'object')
            return undefined;
        return group[this.optionGroupIcon()];
    }
    getGroupAvatarBackground(group) {
        return this.getAvatarBackgroundByColor(this.getGroupColor(group));
    }
    getGroupAvatarColor(group) {
        return this.getAvatarColorByColor(this.getGroupColor(group));
    }
    getGroupAvatarShape(group) {
        if (!group || typeof group !== 'object') {
            return this.normalizeAvatarShape(this.optionGroupAvatarShape());
        }
        return this.normalizeAvatarShape(group[this.optionGroupIconShape()] ?? this.optionGroupAvatarShape());
    }
    getOptionColor(option) {
        const resolvedOption = this.resolveOption(option);
        if (!resolvedOption || typeof resolvedOption !== 'object')
            return undefined;
        return resolvedOption[this.optionIconColor()];
    }
    getGroupColor(group) {
        if (!group || typeof group !== 'object')
            return undefined;
        return group[this.optionGroupIconColor()];
    }
    getAvatarBackgroundByColor(color) {
        if (!color)
            return null;
        if (color.startsWith('#'))
            return `${color}1a`;
        return `var(--p-${color}-100)`;
    }
    getAvatarColorByColor(color) {
        if (!color)
            return null;
        if (color.startsWith('#'))
            return color;
        return `var(--p-${color}-600)`;
    }
    normalizeAvatarShape(shape) {
        return shape === 'square' ? 'square' : 'circle';
    }
    /**
     * Resolves a nested dot-notation path (e.g. "name.display") on an object.
     * Falls back to direct property access for non-nested keys.
     */
    resolveNestedValue(obj, path) {
        if (!path.includes('.')) {
            return obj[path];
        }
        return path.split('.').reduce((current, key) => current?.[key], obj);
    }
    resolveOption(optionOrValue) {
        if (optionOrValue == null || typeof optionOrValue === 'object') {
            return optionOrValue;
        }
        const options = this.options() ?? [];
        const optionValueKey = this.optionValue();
        if (!optionValueKey) {
            return (options.find((option) => option === optionOrValue) ?? optionOrValue);
        }
        if (this.group()) {
            const groupChildrenKey = this.optionGroupChildren();
            for (const group of options) {
                const children = group?.[groupChildrenKey];
                if (!Array.isArray(children))
                    continue;
                const match = children.find((item) => item?.[optionValueKey] === optionOrValue);
                if (match)
                    return match;
            }
            return optionOrValue;
        }
        return (options.find((option) => option?.[optionValueKey] === optionOrValue) ??
            optionOrValue);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SelectField, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: SelectField, isStandalone: true, selector: "mt-select-field", inputs: { field: { classPropertyName: "field", publicName: "field", 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 }, hasPlaceholderPrefix: { classPropertyName: "hasPlaceholderPrefix", publicName: "hasPlaceholderPrefix", 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 }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", 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 }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, clearAfterSelect: { classPropertyName: "clearAfterSelect", publicName: "clearAfterSelect", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionIcon: { classPropertyName: "optionIcon", publicName: "optionIcon", isSignal: true, isRequired: false, transformFunction: null }, optionIconColor: { classPropertyName: "optionIconColor", publicName: "optionIconColor", isSignal: true, isRequired: false, transformFunction: null }, optionIconShape: { classPropertyName: "optionIconShape", publicName: "optionIconShape", isSignal: true, isRequired: false, transformFunction: null }, optionAvatarShape: { classPropertyName: "optionAvatarShape", publicName: "optionAvatarShape", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIcon: { classPropertyName: "optionGroupIcon", publicName: "optionGroupIcon", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIconColor: { classPropertyName: "optionGroupIconColor", publicName: "optionGroupIconColor", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIconShape: { classPropertyName: "optionGroupIconShape", publicName: "optionGroupIconShape", isSignal: true, isRequired: false, transformFunction: null }, optionGroupAvatarShape: { classPropertyName: "optionGroupAvatarShape", publicName: "optionGroupAvatarShape", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class": "this.styleClass" }, classAttribute: "block gap-1" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label()) {\r\n  <label\r\n    (click)=\"dropdown.show(); dropdown.focus()\"\r\n    [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n    [for]=\"ngControl?.name || label()\"\r\n    >{{ label() }}</label\r\n  >\r\n}\r\n<p-select\r\n  #dropdown\r\n  appendTo=\"body\"\r\n  [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n  [ngModel]=\"value()\"\r\n  (ngModelChange)=\"onValueChange($event)\"\r\n  [options]=\"options()\"\r\n  [optionLabel]=\"optionLabel()\"\r\n  [optionValue]=\"optionValue()\"\r\n  (onBlur)=\"onTouched()\"\r\n  [disabled]=\"disabled() || readonly()\"\r\n  [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n  [id]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n  [invalid]=\"isInvalid(ngControl?.control)\"\r\n  placeholder=\"{{\r\n    (hasPlaceholderPrefix() ? ('components.table.select' | transloco) : '') +\r\n      ' ' +\r\n      (placeholder() ?? label() ?? '')\r\n  }}\"\r\n  [filter]=\"filter()\"\r\n  [filterBy]=\"filterBy()\"\r\n  [dataKey]=\"dataKey()\"\r\n  styleClass=\"mt-1\"\r\n  [showClear]=\"showClear()\"\r\n  [group]=\"isGrouped()\"\r\n  [optionGroupLabel]=\"optionGroupLabel()\"\r\n  [optionGroupChildren]=\"optionGroupChildren()\"\r\n  [loading]=\"loading()\"\r\n  [fluid]=\"true\"\r\n  [size]=\"size()\"\r\n>\r\n  <ng-template let-option #selectedItem>\r\n    @if (option) {\r\n      <div class=\"flex items-center gap-2\">\r\n        @if (getOptionIcon(option)) {\r\n          <mt-avatar\r\n            [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n            [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n            [icon]=\"getOptionIcon(option)\"\r\n            [shape]=\"getOptionAvatarShape(option)\"\r\n            size=\"normal\"\r\n          />\r\n        }\r\n        <span>{{ getOptionLabelValue(option) }}</span>\r\n      </div>\r\n    } @else {\r\n      <span class=\"text-color-secondary\">{{\r\n        (hasPlaceholderPrefix()\r\n          ? (\"components.table.select\" | transloco)\r\n          : \"\") +\r\n          \" \" +\r\n          (placeholder() ?? label() ?? \"\")\r\n      }}</span>\r\n    }\r\n  </ng-template>\r\n\r\n  <ng-template let-option #item>\r\n    <div class=\"flex items-center gap-2\">\r\n      @if (getOptionIcon(option)) {\r\n        <mt-avatar\r\n          [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n          [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n          [icon]=\"getOptionIcon(option)\"\r\n          [shape]=\"getOptionAvatarShape(option)\"\r\n          size=\"normal\"\r\n        />\r\n      }\r\n      <span>{{ getOptionLabelValue(option) }}</span>\r\n    </div>\r\n  </ng-template>\r\n\r\n  <ng-template let-group #group>\r\n    <div class=\"flex items-center gap-2\">\r\n      @if (getGroupIcon(group)) {\r\n        <mt-avatar\r\n          [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n          [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n          [icon]=\"getGroupIcon(group)\"\r\n          [shape]=\"getGroupAvatarShape(group)\"\r\n          size=\"normal\"\r\n        />\r\n      }\r\n      <span class=\"font-medium\">{{ getGroupLabelValue(group) }}</span>\r\n    </div>\r\n  </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n  <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n", styles: [""], 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: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: SelectField, decorators: [{
            type: Component,
            args: [{ selector: 'mt-select-field', standalone: true, imports: [FormsModule, Select, FieldValidation, TranslocoModule, Avatar], changeDetection: ChangeDetectionStrategy.OnPush, host: {
                        class: 'block gap-1',
                    }, template: "@if (label()) {\r\n  <label\r\n    (click)=\"dropdown.show(); dropdown.focus()\"\r\n    [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n    [for]=\"ngControl?.name || label()\"\r\n    >{{ label() }}</label\r\n  >\r\n}\r\n<p-select\r\n  #dropdown\r\n  appendTo=\"body\"\r\n  [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n  [ngModel]=\"value()\"\r\n  (ngModelChange)=\"onValueChange($event)\"\r\n  [options]=\"options()\"\r\n  [optionLabel]=\"optionLabel()\"\r\n  [optionValue]=\"optionValue()\"\r\n  (onBlur)=\"onTouched()\"\r\n  [disabled]=\"disabled() || readonly()\"\r\n  [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n  [id]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n  [invalid]=\"isInvalid(ngControl?.control)\"\r\n  placeholder=\"{{\r\n    (hasPlaceholderPrefix() ? ('components.table.select' | transloco) : '') +\r\n      ' ' +\r\n      (placeholder() ?? label() ?? '')\r\n  }}\"\r\n  [filter]=\"filter()\"\r\n  [filterBy]=\"filterBy()\"\r\n  [dataKey]=\"dataKey()\"\r\n  styleClass=\"mt-1\"\r\n  [showClear]=\"showClear()\"\r\n  [group]=\"isGrouped()\"\r\n  [optionGroupLabel]=\"optionGroupLabel()\"\r\n  [optionGroupChildren]=\"optionGroupChildren()\"\r\n  [loading]=\"loading()\"\r\n  [fluid]=\"true\"\r\n  [size]=\"size()\"\r\n>\r\n  <ng-template let-option #selectedItem>\r\n    @if (option) {\r\n      <div class=\"flex items-center gap-2\">\r\n        @if (getOptionIcon(option)) {\r\n          <mt-avatar\r\n            [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n            [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n            [icon]=\"getOptionIcon(option)\"\r\n            [shape]=\"getOptionAvatarShape(option)\"\r\n            size=\"normal\"\r\n          />\r\n        }\r\n        <span>{{ getOptionLabelValue(option) }}</span>\r\n      </div>\r\n    } @else {\r\n      <span class=\"text-color-secondary\">{{\r\n        (hasPlaceholderPrefix()\r\n          ? (\"components.table.select\" | transloco)\r\n          : \"\") +\r\n          \" \" +\r\n          (placeholder() ?? label() ?? \"\")\r\n      }}</span>\r\n    }\r\n  </ng-template>\r\n\r\n  <ng-template let-option #item>\r\n    <div class=\"flex items-center gap-2\">\r\n      @if (getOptionIcon(option)) {\r\n        <mt-avatar\r\n          [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n          [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n          [icon]=\"getOptionIcon(option)\"\r\n          [shape]=\"getOptionAvatarShape(option)\"\r\n          size=\"normal\"\r\n        />\r\n      }\r\n      <span>{{ getOptionLabelValue(option) }}</span>\r\n    </div>\r\n  </ng-template>\r\n\r\n  <ng-template let-group #group>\r\n    <div class=\"flex items-center gap-2\">\r\n      @if (getGroupIcon(group)) {\r\n        <mt-avatar\r\n          [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n          [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n          [icon]=\"getGroupIcon(group)\"\r\n          [shape]=\"getGroupAvatarShape(group)\"\r\n          size=\"normal\"\r\n        />\r\n      }\r\n      <span class=\"font-medium\">{{ getGroupLabelValue(group) }}</span>\r\n    </div>\r\n  </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n  <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n" }]
        }], ctorParameters: () => [], propDecorators: { dropdown: [{
                type: ViewChild,
                args: ['dropdown', { static: true }]
            }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hasPlaceholderPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPlaceholderPrefix", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], clearAfterSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAfterSelect", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], optionIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIcon", required: false }] }], optionIconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIconColor", required: false }] }], optionIconShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIconShape", required: false }] }], optionAvatarShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionAvatarShape", required: false }] }], optionGroupIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupIcon", required: false }] }], optionGroupIconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupIconColor", required: false }] }], optionGroupIconShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupIconShape", required: false }] }], optionGroupAvatarShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupAvatarShape", required: false }] }], onChange: [{
                type: Output
            }], styleClass: [{
                type: HostBinding,
                args: ['class']
            }] } });

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

export { SelectField };
//# sourceMappingURL=masterteam-components-select-field.mjs.map
