import { __decorate, __metadata } from "tslib";
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { DevConfigService, WithConfig } from 'ng-devui/utils';
import * as i0 from "@angular/core";
import * as i1 from "ng-devui/utils";
import * as i2 from "@angular/common";
export class ToggleMenuOperationComponent {
    constructor(devConfigService) {
        this.devConfigService = devConfigService;
        this.showAnimation = true;
        this.chevronStatus = false;
        this.operationChangeEvent = new EventEmitter();
    }
    operationFn(event, operate) {
        this.operationChangeEvent.emit({ event, operate });
    }
}
ToggleMenuOperationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ToggleMenuOperationComponent, deps: [{ token: i1.DevConfigService }], target: i0.ɵɵFactoryTarget.Component });
ToggleMenuOperationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ToggleMenuOperationComponent, selector: "d-toggle-menu-operation", inputs: { controlConfig: "controlConfig", showAnimation: "showAnimation", chevronStatus: "chevronStatus" }, outputs: { operationChangeEvent: "operationChangeEvent" }, ngImport: i0, template: "<div class=\"devui-toggle-menu-operation-container\">\n  <span\n    *ngIf=\"controlConfig?.clear\"\n    class=\"devui-select-clear-icon\"\n    (mousedown)=\"$event.preventDefault()\"\n    (click)=\"operationFn($event, 'clear')\"\n  >\n    <svg\n      width=\"16px\"\n      height=\"16px\"\n      viewBox=\"0 0 16 16\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n        <path\n          d=\"M8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 Z M5.87867966,5.17157288 C5.68341751,4.97631073 5.36683502,4.97631073 5.17157288,5.17157288 C4.99800652,5.34513923 4.97872137,5.61456363 5.11371742,5.80943177 L5.17157288,5.87867966 L7.29218611,7.99929289 L5.17157288,10.1213203 C4.97631073,10.3165825 4.97631073,10.633165 5.17157288,10.8284271 C5.34513923,11.0019935 5.61456363,11.0212786 5.80943177,10.8862826 L5.87867966,10.8284271 L7.99929289,8.70639967 L10.1213203,10.8284271 C10.3165825,11.0236893 10.633165,11.0236893 10.8284271,10.8284271 C11.0019935,10.6548608 11.0212786,10.3854364 10.8862826,10.1905682 L10.8284271,10.1213203 L8.70710678,8 L10.8284271,5.87867966 C11.0236893,5.68341751 11.0236893,5.36683502 10.8284271,5.17157288 C10.6548608,4.99800652 10.3854364,4.97872137 10.1905682,5.11371742 L10.1213203,5.17157288 L8,7.29289322 L5.87867966,5.17157288 Z\"\n          fill-rule=\"nonzero\"\n        ></path>\n      </g>\n    </svg>\n  </span>\n  <span\n    *ngIf=\"controlConfig?.chevron\"\n    class=\"devui-toggle-menu-chevron-icon\"\n    [ngClass]=\"{ 'devui-toggle-menu-chevron-icon-animation': showAnimation, 'devui-toggle-menu-chevron-icon-open': chevronStatus }\"\n  >\n    <svg\n      width=\"1em\"\n      height=\"1em\"\n      viewBox=\"0 0 16 16\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n        <path\n          d=\"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z\"\n          fill-rule=\"nonzero\"\n        ></path>\n      </g>\n    </svg>\n  </span>\n</div>\n", styles: [":host .devui-toggle-menu-operation-container{min-height:inherit}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon{width:28px;height:100%;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon-open{transform:rotate(180deg)}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon-animation{transition:transform .3s cubic-bezier(.645,.045,.355,1);transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon>svg path{fill:#71757f;fill:var(--devui-icon-text, #71757f)}:host .devui-toggle-menu-operation-container.disabled{cursor:not-allowed;background-color:#f5f5f5;background-color:var(--devui-disabled-bg, #f5f5f5)}:host .devui-toggle-menu-operation-container.disabled .devui-toggle-menu-clear-icon svg path,:host .devui-toggle-menu-operation-container.disabled .devui-toggle-menu-chevron-icon svg path{fill:#cfd0d3;fill:var(--devui-disabled-text, #cfd0d3)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
__decorate([
    WithConfig(),
    __metadata("design:type", Object)
], ToggleMenuOperationComponent.prototype, "showAnimation", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ToggleMenuOperationComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-toggle-menu-operation', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"devui-toggle-menu-operation-container\">\n  <span\n    *ngIf=\"controlConfig?.clear\"\n    class=\"devui-select-clear-icon\"\n    (mousedown)=\"$event.preventDefault()\"\n    (click)=\"operationFn($event, 'clear')\"\n  >\n    <svg\n      width=\"16px\"\n      height=\"16px\"\n      viewBox=\"0 0 16 16\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n        <path\n          d=\"M8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 Z M5.87867966,5.17157288 C5.68341751,4.97631073 5.36683502,4.97631073 5.17157288,5.17157288 C4.99800652,5.34513923 4.97872137,5.61456363 5.11371742,5.80943177 L5.17157288,5.87867966 L7.29218611,7.99929289 L5.17157288,10.1213203 C4.97631073,10.3165825 4.97631073,10.633165 5.17157288,10.8284271 C5.34513923,11.0019935 5.61456363,11.0212786 5.80943177,10.8862826 L5.87867966,10.8284271 L7.99929289,8.70639967 L10.1213203,10.8284271 C10.3165825,11.0236893 10.633165,11.0236893 10.8284271,10.8284271 C11.0019935,10.6548608 11.0212786,10.3854364 10.8862826,10.1905682 L10.8284271,10.1213203 L8.70710678,8 L10.8284271,5.87867966 C11.0236893,5.68341751 11.0236893,5.36683502 10.8284271,5.17157288 C10.6548608,4.99800652 10.3854364,4.97872137 10.1905682,5.11371742 L10.1213203,5.17157288 L8,7.29289322 L5.87867966,5.17157288 Z\"\n          fill-rule=\"nonzero\"\n        ></path>\n      </g>\n    </svg>\n  </span>\n  <span\n    *ngIf=\"controlConfig?.chevron\"\n    class=\"devui-toggle-menu-chevron-icon\"\n    [ngClass]=\"{ 'devui-toggle-menu-chevron-icon-animation': showAnimation, 'devui-toggle-menu-chevron-icon-open': chevronStatus }\"\n  >\n    <svg\n      width=\"1em\"\n      height=\"1em\"\n      viewBox=\"0 0 16 16\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n        <path\n          d=\"M12.1464466,6.85355339 L8.35355339,10.6464466 C8.15829124,10.8417088 7.84170876,10.8417088 7.64644661,10.6464466 L3.85355339,6.85355339 C3.65829124,6.65829124 3.65829124,6.34170876 3.85355339,6.14644661 C3.94732158,6.05267842 4.07449854,6 4.20710678,6 L11.7928932,6 C12.0690356,6 12.2928932,6.22385763 12.2928932,6.5 C12.2928932,6.63260824 12.2402148,6.7597852 12.1464466,6.85355339 Z\"\n          fill-rule=\"nonzero\"\n        ></path>\n      </g>\n    </svg>\n  </span>\n</div>\n", styles: [":host .devui-toggle-menu-operation-container{min-height:inherit}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon{width:28px;height:100%;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon-open{transform:rotate(180deg)}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon-animation{transition:transform .3s cubic-bezier(.645,.045,.355,1);transition:transform var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}:host .devui-toggle-menu-operation-container .devui-toggle-menu-chevron-icon>svg path{fill:#71757f;fill:var(--devui-icon-text, #71757f)}:host .devui-toggle-menu-operation-container.disabled{cursor:not-allowed;background-color:#f5f5f5;background-color:var(--devui-disabled-bg, #f5f5f5)}:host .devui-toggle-menu-operation-container.disabled .devui-toggle-menu-clear-icon svg path,:host .devui-toggle-menu-operation-container.disabled .devui-toggle-menu-chevron-icon svg path{fill:#cfd0d3;fill:var(--devui-disabled-text, #cfd0d3)}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.DevConfigService }]; }, propDecorators: { controlConfig: [{
                type: Input
            }], showAnimation: [{
                type: Input
            }], chevronStatus: [{
                type: Input
            }], operationChangeEvent: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 