/**
 * @fileoverview added by tsickle
 * Generated from: business-component/chart/chart-menu/chart-menu.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, ViewChild, Input } from '@angular/core';
import { ENgxPrintComponent } from "e-ngx-print";
import { ChartMenuService } from '../service/chart-menu.service';
var ChartMenuComponent = /** @class */ (function () {
    function ChartMenuComponent(chartMenuService) {
        this.chartMenuService = chartMenuService;
        // closePanel(event) {
        //   let el = <HTMLElement>event.target;
        //   if (el) {
        //     el.setAttribute("style", "display:none");
        //   }
        // }
        this.visible = false;
    }
    /**
     * @return {?}
     */
    ChartMenuComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    /**
     * @return {?}
     */
    ChartMenuComponent.prototype.closeDropDownMenu = /**
     * @return {?}
     */
    function () {
        this.visible = false;
    };
    /**
     * @param {?} imageType
     * @param {?} fileName
     * @return {?}
     */
    ChartMenuComponent.prototype.downloadImage = /**
     * @param {?} imageType
     * @param {?} fileName
     * @return {?}
     */
    function (imageType, fileName) {
        this.chartMenuService.downloadEchartImage(this.chartInstance, fileName, imageType);
    };
    /**
     * @return {?}
     */
    ChartMenuComponent.prototype.fullScreen = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var element = this.chartInstance.getDom();
        this.chartMenuService.fullScreen(element);
    };
    /**
     * @return {?}
     */
    ChartMenuComponent.prototype.customPrint = /**
     * @return {?}
     */
    function () {
        this.chartMenuService.customPrint(this.chartInstance, this.print1Component);
    };
    ChartMenuComponent.decorators = [
        { type: Component, args: [{
                    selector: 'bcac-chart-menu',
                    template: "<div\r\nclass=\"menuIcon\"\r\nnz-dropdown \r\nnzTrigger=\"click\"\r\n[(nzVisible)]=\"visible\"\r\n[nzDropdownMenu]=\"chartMenuControl\"\r\nnzPlacement=\"bottomRight\">\r\n    <bcac-icon\r\n    iconType=\"chart_menu\" \r\n    tooltipTitle=\"\u83DC\u5355\">\r\n    </bcac-icon>\r\n</div>\r\n<nz-dropdown-menu #chartMenuControl=\"nzDropdownMenu\" style=\"width: 50%;z-index: 100;\">\r\n    <div class=\"echart-menu-panel\" (mouseleave)=\"closeDropDownMenu()\">\r\n        <div class=\"echart-menu-panel-border\">\r\n            <div class=\"echart-menu-panel-box above\">\r\n                <div (click)=\"fullScreen()\">\u5168\u5C4F\u67E5\u770B</div>\r\n                <div (click)=\"customPrint()\">\u6253\u5370\u56FE\u8868</div>\r\n            </div>\r\n            <div class=\"echart-menu-panel-box bottom\">\r\n                <div (click)=\"downloadImage('.png', fileName)\">\u4E0B\u8F7DPNG\u6587\u4EF6</div>\r\n                <div (click)=\"downloadImage('.jpeg', fileName)\">\u4E0B\u8F7DJPEG\u6587\u4EF6</div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <!-- <div class=\"dropMenuPanel\" [style.width]=\"dropMenuPanelWidth\">\r\n        <label>\u9009\u62E9{{tooltipTitle}}</label>\r\n        <nz-divider style=\"margin: 0.2rem\"></nz-divider>\r\n        <nz-radio-group [(ngModel)]=\"radioValue\" (ngModelChange)=\"selectedChange()\">\r\n            <label *ngFor=\"let item of selectValue\"\r\n            nz-radio \r\n            class=\"radio\"\r\n            [nzValue]=\"item.value\">\r\n            {{item.label}}\r\n            </label>\r\n        </nz-radio-group>\r\n    </div> -->\r\n</nz-dropdown-menu>\r\n<ng-content></ng-content>\r\n<e-ngx-print #print1 [showBtn]=\"false\">\r\n</e-ngx-print>",
                    styles: [".menuIcon{width:20px;text-align:center}.echart-menu-panel{font-size:1.2rem;font-weight:450}.echart-menu-panel .echart-menu-panel-border{box-shadow:.2rem .2rem 1rem #888;border:.1rem solid #aaa4a4;background-color:#fff}.echart-menu-panel .echart-menu-panel-box{padding:.4rem 0;border-bottom:.1rem solid #aaa4a4}.echart-menu-panel .echart-menu-panel-box div{padding:.4rem .8rem}.echart-menu-panel .echart-menu-panel-box div:hover{background-color:#335cad;cursor:pointer;color:#fff}"]
                }] }
    ];
    /** @nocollapse */
    ChartMenuComponent.ctorParameters = function () { return [
        { type: ChartMenuService }
    ]; };
    ChartMenuComponent.propDecorators = {
        print1Component: [{ type: ViewChild, args: ["print1", { static: false },] }],
        chartInstance: [{ type: Input }],
        fileName: [{ type: Input }]
    };
    return ChartMenuComponent;
}());
export { ChartMenuComponent };
if (false) {
    /** @type {?} */
    ChartMenuComponent.prototype.print1Component;
    /** @type {?} */
    ChartMenuComponent.prototype.chartInstance;
    /** @type {?} */
    ChartMenuComponent.prototype.fileName;
    /** @type {?} */
    ChartMenuComponent.prototype.visible;
    /**
     * @type {?}
     * @private
     */
    ChartMenuComponent.prototype.chartMenuService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQtbWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9iY2FjLWxpYi8iLCJzb3VyY2VzIjpbImJ1c2luZXNzLWNvbXBvbmVudC9jaGFydC9jaGFydC1tZW51L2NoYXJ0LW1lbnUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBVSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3BFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUNqRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUVqRTtJQVNFLDRCQUNVLGdCQUFrQztRQUFsQyxxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQWtCOzs7Ozs7O1FBYzVDLFlBQU8sR0FBWSxLQUFLLENBQUM7SUFickIsQ0FBQzs7OztJQUtMLHFDQUFROzs7SUFBUixjQUFhLENBQUM7Ozs7SUFTZCw4Q0FBaUI7OztJQUFqQjtRQUNFLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxDQUFD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