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, normal);--evo-autocomplete-default-option-text-color: #212121;--evo-autocomplete-default-option-description-color: #9B9B9B;--evo-autocomplete-default-option-background: #FFFFFF}.option{position:relative;z-index:1;color:var(--evo-autocomplete-default-option-text-color);background:var(--evo-autocomplete-default-option-background)}.option__label{font-family:var(--evo-font);font-style:normal;font-size:14px;line-height:24px;font-weight:400;display:block;margin-bottom:0;overflow:var(--evo-autocomplete-option-overflow, hidden);color:var(--evo-autocomplete-default-option-text-color);text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}.option__description{font-family:var(--evo-font);font-style:normal;font-size:12px;line-height:18px;font-weight:400;display:block;overflow:var(--evo-autocomplete-option-overflow, hidden);color:var(--evo-autocomplete-default-option-description-color);text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}.option evo-checkbox{color:var(--evo-autocomplete-default-option-text-color)}.option evo-checkbox+.option__description{padding-left:32px}\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, normal);--evo-autocomplete-default-option-text-color: #212121;--evo-autocomplete-default-option-description-color: #9B9B9B;--evo-autocomplete-default-option-background: #FFFFFF}.option{position:relative;z-index:1;color:var(--evo-autocomplete-default-option-text-color);background:var(--evo-autocomplete-default-option-background)}.option__label{font-family:var(--evo-font);font-style:normal;font-size:14px;line-height:24px;font-weight:400;display:block;margin-bottom:0;overflow:var(--evo-autocomplete-option-overflow, hidden);color:var(--evo-autocomplete-default-option-text-color);text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}.option__description{font-family:var(--evo-font);font-style:normal;font-size:12px;line-height:18px;font-weight:400;display:block;overflow:var(--evo-autocomplete-option-overflow, hidden);color:var(--evo-autocomplete-default-option-description-color);text-overflow:var(--evo-autocomplete-option-text-overflow, ellipsis)}.option evo-checkbox{color:var(--evo-autocomplete-default-option-text-color)}.option evo-checkbox+.option__description{padding-left:32px}\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, 