/**
 * @fileoverview added by tsickle
 * Generated from: lib/actions/toolbar-item/index.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, ElementRef, HostBinding, Input, ViewChild, } from "@angular/core";
var ToolbarItemComponent = /** @class */ (function () {
    function ToolbarItemComponent() {
        this.children = [];
        this.hideArrow = false;
        this.disabledOptions = {};
        this.ImageType = [
            "Add",
            "Delete",
            "Update",
            "Import",
            "Export",
            "Upload",
            "Download",
            "Duplicate",
            "Refresh",
            "AddFolder",
            "Collapse",
            "Combine",
            "Edit",
            "Lock",
            "Expand",
            "MoveTo",
            "Publish",
            "Preview",
            "ReCalculate",
            "Sync",
            "Share",
            "Rename",
            "SaveSequence",
            "SubmitForApproval",
            "SendToControlPanel",
            "SetReminders",
            "Settle",
            "Template",
            "Workflow",
            "FetchData",
        ];
    }
    Object.defineProperty(ToolbarItemComponent.prototype, "hostDisabled", {
        get: /**
         * @return {?}
         */
        function () {
            return !!this.disabled;
        },
        enumerable: true,
        configurable: true
    });
    // 暴露方法供父组件调用
    // 暴露方法供父组件调用
    /**
     * @return {?}
     */
    ToolbarItemComponent.prototype.getWidth = 
    // 暴露方法供父组件调用
    /**
     * @return {?}
     */
    function () {
        return this.buttonElement.nativeElement.offsetWidth;
    };
    ToolbarItemComponent.decorators = [
        { type: Component, args: [{
                    selector: "rs-toolbar-item",
                    template: "<button\r\n  *ngIf=\"!children.length\"\r\n  class=\"toolbar-action-item e-btn text\"\r\n  #buttonElement\r\n  [disabled]=\"!!disabled\"\r\n>\r\n  <span class=\"toolbar-action-image\" *ngIf=\"image\" [attr.data-type]=\"image\">\r\n    <img *ngIf=\"!ImageType.includes(image)\" [src]=\"image\" />\r\n  </span>\r\n  <span>{{ text }}</span>\r\n</button>\r\n\r\n<button\r\n  *ngIf=\"children.length\"\r\n  class=\"toolbar-action-item e-btn text\"\r\n  #buttonElement\r\n  mat-menu-item\r\n  [matMenuTriggerFor]=\"menu\"\r\n  [disabled]=\"!!disabled\"\r\n>\r\n  <span class=\"toolbar-action-image\" *ngIf=\"image\" [attr.data-type]=\"image\">\r\n    <img *ngIf=\"!ImageType.includes(image)\" [src]=\"image\" />\r\n  </span>\r\n  <span>{{ text }}</span>\r\n  <span class=\"toolbar-action-arrow\" *ngIf=\"!hideArrow\">\r\n    <img src=\"assets/img/down-arrow.svg\" />\r\n  </span>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" class=\"toolbar-action-menu-content\">\r\n  <ng-container *ngFor=\"let button of children\">\r\n    <button\r\n      class=\"toolbar-action-item e-btn text\"\r\n      [disabled]=\"(button.key && disabledOptions[button.key]) || false\"\r\n      (click)=\"button.action()\"\r\n    >\r\n      <span\r\n        class=\"toolbar-action-image\"\r\n        *ngIf=\"button.image\"\r\n        [attr.data-type]=\"button.image\"\r\n      >\r\n        <img *ngIf=\"!ImageType.includes(button.image)\" [src]=\"button.image\" />\r\n      </span>\r\n      <span>{{ button.text }}</span>\r\n    </button>\r\n  </ng-container>\r\n</mat-menu>\r\n",
                    styles: ["rs-toolbar-item.disabled{pointer-events:none}.toolbar-action-item{padding:4px 8px;font-size:11px!important;line-height:24px!important}.toolbar-action-item .toolbar-action-image{height:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}.toolbar-action-item .toolbar-action-image::before{display:block;width:16px;height:16px}.toolbar-action-item .toolbar-action-image[data-type=Add]::before{content:url(/assets/img/toolbar-action-add.svg)}.toolbar-action-item .toolbar-action-image[data-type=Delete]::before{content:url(/assets/img/toolbar-action-delete.svg)}.toolbar-action-item .toolbar-action-image[data-type=Import]::before{content:url(/assets/img/toolbar-action-import.svg)}.toolbar-action-item .toolbar-action-image[data-type=Upload]::before{content:url(/assets/img/toolbar-action-upload.svg)}.toolbar-action-item .toolbar-action-image[data-type=Download]::before{content:url(/assets/img/toolbar-action-download.svg)}.toolbar-action-item .toolbar-action-image[data-type=Export]::before{content:url(/assets/img/toolbar-action-export.svg)}.toolbar-action-item .toolbar-action-image[data-type=Duplicate]::before{content:url(/assets/img/toolbar-action-duplicate.svg)}.toolbar-action-item .toolbar-action-image[data-type=Refresh]::before{content:url(/assets/img/toolbar-action-refresh.svg)}.toolbar-action-item .toolbar-action-image[data-type=AddFolder]::before{content:url(/assets/img/toolbar-action-addFolder.svg)}.toolbar-action-item .toolbar-action-image[data-type=Collapse]::before{content:url(/assets/img/toolbar-action-collapse.svg)}.toolbar-action-item .toolbar-action-image[data-type=Combine]::before{content:url(/assets/img/toolbar-action-combine.svg)}.toolbar-action-item .toolbar-action-image[data-type=Edit]::before{content:url(/assets/img/toolbar-action-edit.svg)}.toolbar-action-item .toolbar-action-image[data-type=Lock]::before{content:url(/assets/img/toolbar-action-lock.svg)}.toolbar-action-item .toolbar-action-image[data-type=Expand]::before{content:url(/assets/img/toolbar-action-expand.svg)}.toolbar-action-item .toolbar-action-image[data-type=MoveTo]::before{content:url(/assets/img/toolbar-action-folderMove.svg)}.toolbar-action-item .toolbar-action-image[data-type=Publish]::before{content:url(/assets/img/toolbar-action-publish.svg)}.toolbar-action-item .toolbar-action-image[data-type=Preview]::before{content:url(/assets/img/toolbar-action-preview.svg)}.toolbar-action-item .toolbar-action-image[data-type=ReCalculate]::before{content:url(/assets/img/toolbar-action-calculator.svg)}.toolbar-action-item .toolbar-action-image[data-type=Sync]::before{content:url(/assets/img/toolbar-action-sync.svg)}.toolbar-action-item .toolbar-action-image[data-type=Share]::before{content:url(/assets/img/toolbar-action-share.svg)}.toolbar-action-item .toolbar-action-image[data-type=Rename]::before{content:url(/assets/img/toolbar-action-rename.svg)}.toolbar-action-item .toolbar-action-image[data-type=SaveSequence]::before{content:url(/assets/img/toolbar-action-saveSequence.svg)}.toolbar-action-item .toolbar-action-image[data-type=SubmitForApproval]::before{content:url(/assets/img/toolbar-action-submitForApproval.svg)}.toolbar-action-item .toolbar-action-image[data-type=SendToControlPanel]::before{content:url(/assets/img/toolbar-action-send-file.svg)}.toolbar-action-item .toolbar-action-image[data-type=SetReminders]::before{content:url(/assets/img/toolbar-action-reminders.svg)}.toolbar-action-item .toolbar-action-image[data-type=Settle]::before{content:url(/assets/img/toolbar-action-settle.svg)}.toolbar-action-item .toolbar-action-image[data-type=Template]::before{content:url(/assets/img/toolbar-action-template.svg)}.toolbar-action-item .toolbar-action-image[data-type=Workflow]::before{content:url(/assets/img/toolbar-action-workflow.svg)}.toolbar-action-item .toolbar-action-image[data-type=Update]::before{content:url(/assets/img/toolbar-action-update.svg)}.toolbar-action-item .toolbar-action-image[data-type=FetchData]::before{content:url(/assets/img/toolbar-action-fetchData.svg)}.toolbar-action-item .toolbar-action-image img{height:16px;display:block}.toolbar-action-item.e-btn{width:100%;min-width:auto!important;height:24px!important;justify-content:flex-start}.toolbar-action-item.mat-menu-item::after{display:none}::ng-deep .toolbar-action-menu-content.mat-menu-panel{border-radius:8px;background-color:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25)}::ng-deep .toolbar-action-menu-content.mat-menu-panel .mat-menu-content{padding:8px}"]
                }] }
    ];
    ToolbarItemComponent.propDecorators = {
        image: [{ type: Input, args: ["image",] }],
        text: [{ type: Input, args: ["text",] }],
        disabled: [{ type: Input, args: ["disabled",] }],
        children: [{ type: Input, args: ["children",] }],
        hideArrow: [{ type: Input, args: ["hideArrow",] }],
        disabledOptions: [{ type: Input }],
        buttonElement: [{ type: ViewChild, args: ["buttonElement", { static: false },] }],
        hostDisabled: [{ type: HostBinding, args: ["class.disabled",] }]
    };
    return ToolbarItemComponent;
}());
export { ToolbarItemComponent };
if (false) {
    /** @type {?} */
    ToolbarItemComponent.prototype.image;
    /** @type {?} */
    ToolbarItemComponent.prototype.text;
    /** @type {?} */
    ToolbarItemComponent.prototype.disabled;
    /** @type {?} */
    ToolbarItemComponent.prototype.children;
    /** @type {?} */
    ToolbarItemComponent.prototype.hideArrow;
    /** @type {?} */
    ToolbarItemComponent.prototype.disabledOptions;
    /** @type {?} */
    ToolbarItemComponent.prototype.buttonElement;
    /**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