import { ChangeDetectionStrategy, Component, HostBinding, Input, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class ToggleMenuInputComponent {
    constructor() {
        this.disabled = false;
        this.readonly = false;
        this.isDisabledCustomTemplate = false;
    }
    get width() {
        return this.inputWidth || 'inherit';
    }
}
ToggleMenuInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ToggleMenuInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
ToggleMenuInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ToggleMenuInputComponent, selector: "d-toggle-menu-input", inputs: { value: "value", inputValue: "inputValue", inputWidth: "inputWidth", disabled: "disabled", readonly: "readonly", filterKey: "filterKey", isDisabledCustomTemplate: "isDisabledCustomTemplate", customTemplate: "customTemplate" }, host: { properties: { "style.width": "this.width" } }, ngImport: i0, template: "<ng-container *ngIf=\"!isDisabledCustomTemplate; else defaultInputTemplate\">\n  <div class=\"devui-toggle-menu-input-template-container\">\n    <ng-template\n      [ngTemplateOutlet]=\"customTemplate\"\n      [ngTemplateOutletContext]=\"{\n        option: value,\n        filterKey: filterKey,\n        position: 'result',\n        inputValue: inputValue\n      }\"\n    ></ng-template>\n  </div>\n</ng-container>\n\n<ng-template #defaultInputTemplate>\n  <input\n    type=\"text\"\n    class=\"devui-form-control devui-select-input devui-input\"\n    autocomplete=\"off\"\n    [disabled]=\"disabled\"\n    [minLength]=\"0\"\n    [tabindex]=\"-1\"\n    [readonly]=\"readonly\"\n    [value]=\"inputValue || ''\"\n  />\n</ng-template>\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}:host .devui-toggle-menu-input-template-container{height:24px;line-height:24px;padding:0 10px}:host input.devui-select-input{cursor:pointer;font-size:inherit;height:inherit;min-height:inherit;line-height:inherit;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border:none!important;padding:0 10px;margin:0;outline:0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ToggleMenuInputComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-toggle-menu-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"!isDisabledCustomTemplate; else defaultInputTemplate\">\n  <div class=\"devui-toggle-menu-input-template-container\">\n    <ng-template\n      [ngTemplateOutlet]=\"customTemplate\"\n      [ngTemplateOutletContext]=\"{\n        option: value,\n        filterKey: filterKey,\n        position: 'result',\n        inputValue: inputValue\n      }\"\n    ></ng-template>\n  </div>\n</ng-container>\n\n<ng-template #defaultInputTemplate>\n  <input\n    type=\"text\"\n    class=\"devui-form-control devui-select-input devui-input\"\n    autocomplete=\"off\"\n    [disabled]=\"disabled\"\n    [minLength]=\"0\"\n    [tabindex]=\"-1\"\n    [readonly]=\"readonly\"\n    [value]=\"inputValue || ''\"\n  />\n</ng-template>\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}:host .devui-toggle-menu-input-template-container{height:24px;line-height:24px;padding:0 10px}:host input.devui-select-input{cursor:pointer;font-size:inherit;height:inherit;min-height:inherit;line-height:inherit;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border:none!important;padding:0 10px;margin:0;outline:0}\n"] }]
        }], propDecorators: { value: [{
                type: Input
            }], inputValue: [{
                type: Input
            }], inputWidth: [{
                type: Input
            }], disabled: [{
                type: Input
            }], readonly: [{
                type: Input
            }], filterKey: [{
                type: Input
            }], isDisabledCustomTemplate: [{
                type: Input
            }], customTemplate: [{
                type: Input
            }], width: [{
                type: HostBinding,
                args: ['style.width']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLW1lbnUtaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vZGV2dWkvdG9nZ2xlLW1lbnUvdG9nZ2xlLW1lbnUtaW5wdXQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vZGV2dWkvdG9nZ2xlLW1lbnUvdG9nZ2xlLW1lbnUtaW5wdXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYX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