/**
 * @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';
export class ChartMenuComponent {
    /**
     * @param {?} chartMenuService
     */
    constructor(chartMenuService) {
        this.chartMenuService = chartMenuService;
        // closePanel(event) {
        //   let el = <HTMLElement>event.target;
        //   if (el) {
        //     el.setAttribute("style", "display:none");
        //   }
        // }
        this.visible = false;
    }
    /**
     * @return {?}
     */
    ngOnInit() { }
    /**
     * @return {?}
     */
    closeDropDownMenu() {
        this.visible = false;
    }
    /**
     * @param {?} imageType
     * @param {?} fileName
     * @return {?}
     */
    downloadImage(imageType, fileName) {
        this.chartMenuService.downloadEchartImage(this.chartInstance, fileName, imageType);
    }
    /**
     * @return {?}
     */
    fullScreen() {
        /** @type {?} */
        const element = this.chartInstance.getDom();
        this.chartMenuService.fullScreen(element);
    }
    /**
     * @return {?}
     */
    customPrint() {
        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 = () => [
    { type: ChartMenuService }
];
ChartMenuComponent.propDecorators = {
    print1Component: [{ type: ViewChild, args: ["print1", { static: false },] }],
    chartInstance: [{ type: Input }],
    fileName: [{ type: Input }]
};
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQtbWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9iY2FjLWxpYi8iLCJzb3VyY2VzIjpbImJ1c2luZXNzLWNvbXBvbmVudC9jaGFydC9jaGFydC1tZW51L2NoYXJ0LW1lbnUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBVSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3BFLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUNqRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQU9qRSxNQUFNLE9BQU8sa0JBQWtCOzs7O0lBSTdCLFlBQ1UsZ0JBQWtDO1FBQWxDLHFCQUFnQixHQUFoQixnQkFBZ0IsQ0FBa0I7Ozs7Ozs7UUFjNUMsWUFBTyxHQUFZLEtBQUssQ0FBQztJQWJyQixDQUFDOzs7O0lBS0wsUUFBUSxLQUFLLENBQUM7Ozs7SUFTZCxpQkFBaUI7UUFDZixJQUFJLENBQUMsT0FBTyxHQUFHLEtBQUssQ0FBQztJQUN2QixDQUFDOzs7Ozs7SUFDRCxhQUFhLENBQUMsU0FBaUIsRUFBRSxRQUFnQjtRQUMvQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsbUJBQW1CLENBQUMsSUFBSSxDQUFDLGFBQWEsRUFBRSxRQUFRLEVBQUUsU0FBUyxDQUFDLENBQUM7SUFDckYsQ0FBQzs7OztJQUNELFVBQVU7O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