import { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../../evo-checkbox/evo-checkbox.component";
import * as i2 from "@angular/common";
import * as i3 from "@angular/forms";
export class EvoAutocompleteDefaultOptionComponent {
    constructor(cdr) {
        this.cdr = cdr;
    }
    get hasCheckboxClass() {
        return this.hasCheckbox;
    }
    onSelectedChange(e) {
        this.cdr.markForCheck();
    }
    onCheckboxClick(e) {
        e.preventDefault();
        e.stopImmediatePropagation();
        if (e.target) {
            e.target.closest('.ng-option')?.dispatchEvent(new Event('click'));
        }
    }
}
EvoAutocompleteDefaultOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: EvoAutocompleteDefaultOptionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
EvoAutocompleteDefaultOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: EvoAutocompleteDefaultOptionComponent, selector: "evo-autocomplete-default-option", inputs: { hasCheckbox: "hasCheckbox", label: "label", description: "description", isDisabled: "isDisabled", isSelected: "isSelected" }, host: { properties: { "class.has-checkbox": "this.hasCheckboxClass" } }, ngImport: i0, template: "<div class=\"option option_has-checkbox\" *ngIf=\"hasCheckbox\">\n    <evo-checkbox\n        [ngModel]=\"isSelected\"\n        [ngModelOptions]=\"{standalone: true}\"\n        [disabled]=\"isDisabled\"\n        (click)=\"onCheckboxClick($event)\"\n        (change)=\"onCheckboxClick($event)\"\n        (ngModelChange)=\"onSelectedChange($event)\"\n    >{{ label }}</evo-checkbox>\n    <ng-container *ngIf=\"description\">\n        <div class=\"option__description\">{{ description }}</div>\n    </ng-container>\n</div>\n<div class=\"option\" *ngIf=\"!hasCheckbox\">\n    <div class=\"option__label\">{{ label }}</div>\n    <ng-container *ngIf=\"description\">\n        <div class=\"option__description\">{{ description }}</div>\n    </ng-container>\n</div>\n", styles: [":host{display:block;color:inherit;white-space:var(--evo-autocomplete-option-white-space, nowrap)}.option{position:relative;z-index:1}.option__label{display:block;margin-bottom:0;overflow:var(--evo-autocomplete-option-overflow, hidden);color:inherit;font-size:14px;line-height:22px;text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}.option__description{display:block;overflow:var(--evo-autocomplete-option-overflow, hidden);color:#9b9b9b;font-size:12px;line-height:18px;text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}evo-checkbox+.option__description{padding-left:32px}.option_has-checkbox{background-color:inherit}:host-context(.ng-option.ng-option-selected) .option_has-checkbox{background-color:#e1ecef!important}:host-context(.ng-option.ng-option-disabled){padding:0}:host-context(.ng-option.ng-option-disabled) .option__description,:host-context(.ng-option.ng-option-disabled) .option__label,:host-context(.ng-option.ng-option-disabled) evo-checkbox{color:#c6c6c6}:host-context(.ng-option.ng-option-selected){padding:0}:host-context(.ng-option.ng-option-marked) .option_has-checkbox{background:#F4F6F8}\n"], components: [{ type: i1.EvoCheckboxComponent, selector: "evo-checkbox", inputs: ["indeterminate"], outputs: ["indeterminateChange"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: EvoAutocompleteDefaultOptionComponent, decorators: [{
            type: Component,
            args: [{ selector: 'evo-autocomplete-default-option', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"option option_has-checkbox\" *ngIf=\"hasCheckbox\">\n    <evo-checkbox\n        [ngModel]=\"isSelected\"\n        [ngModelOptions]=\"{standalone: true}\"\n        [disabled]=\"isDisabled\"\n        (click)=\"onCheckboxClick($event)\"\n        (change)=\"onCheckboxClick($event)\"\n        (ngModelChange)=\"onSelectedChange($event)\"\n    >{{ label }}</evo-checkbox>\n    <ng-container *ngIf=\"description\">\n        <div class=\"option__description\">{{ description }}</div>\n    </ng-container>\n</div>\n<div class=\"option\" *ngIf=\"!hasCheckbox\">\n    <div class=\"option__label\">{{ label }}</div>\n    <ng-container *ngIf=\"description\">\n        <div class=\"option__description\">{{ description }}</div>\n    </ng-container>\n</div>\n", styles: [":host{display:block;color:inherit;white-space:var(--evo-autocomplete-option-white-space, nowrap)}.option{position:relative;z-index:1}.option__label{display:block;margin-bottom:0;overflow:var(--evo-autocomplete-option-overflow, hidden);color:inherit;font-size:14px;line-height:22px;text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}.option__description{display:block;overflow:var(--evo-autocomplete-option-overflow, hidden);color:#9b9b9b;font-size:12px;line-height:18px;text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}evo-checkbox+.option__description{padding-left:32px}.option_has-checkbox{background-color:inherit}:host-context(.ng-option.ng-option-selected) .option_has-checkbox{background-color:#e1ecef!important}:host-context(.ng-option.ng-option-disabled){padding:0}:host-context(.ng-option.ng-option-disabled) .option__description,:host-context(.ng-option.ng-option-disabled) .option__label,:host-context(.ng-option.ng-option-disabled) evo-checkbox{color:#c6c6c6}:host-context(.ng-option.ng-option-selected){padding:0}:host-context(.ng-option.ng-option-marked) .option_has-checkbox{background:#F4F6F8}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { hasCheckbox: [{
                type: Input
            }], label: [{
                type: Input
            }], description: [{
                type: Input
            }], isDisabled: [{
                type: Input
            }], isSelected: [{
                type: Input
            }], hasCheckboxClass: [{
                type: HostBinding,
                args: ['class.has-checkbox']
            }] } });
//# sourceMappingURL=data:application/json;base64, 