import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../pdf-shy-button/pdf-shy-button.component";
import * as i2 from "../../responsive-visibility";
export class PdfToggleSidebarComponent {
    ngZone;
    show = true;
    sidebarVisible = false;
    showChange = new EventEmitter();
    onClick;
    constructor(ngZone) {
        this.ngZone = ngZone;
        const emitter = this.showChange;
        this.onClick = () => {
            const PDFViewerApplication = window.PDFViewerApplication;
            const newVisibility = !PDFViewerApplication.pdfSidebar.isOpen;
            emitter.emit(newVisibility);
            PDFViewerApplication.eventBus.dispatch('toggleSidebar', { visible: newVisibility });
        };
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: PdfToggleSidebarComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.6", type: PdfToggleSidebarComponent, selector: "pdf-toggle-sidebar", inputs: { show: "show", sidebarVisible: "sidebarVisible" }, outputs: { showChange: "showChange" }, ngImport: i0, template: "<pdf-shy-button\n  title=\"Toggle Sidebar\"\n  primaryToolbarId=\"primarySidebarToggle\"\n  [cssClass]=\"show | responsiveCSSClass : 'always-visible'\"\n  [toggled]=\"sidebarVisible === true\"\n  l10nId=\"pdfjs-toggle-sidebar-button\"\n  l10nLabel=\"pdfjs-toggle-sidebar-button-label\"\n  [order]=\"4500\"\n  [closeOnClick]=\"true\"\n  [action]=\"onClick\"\n  image=\"<svg width='24px' height='24px' viewBox='0 0 24 24'> <path fill='currentColor' d='M3,9H17V7H3V9M3,13H17V11H3V13M3,17H17V15H3V17M19,17H21V15H19V17M19,7V9H21V7H19M19,13H21V11H19V13Z' /> </svg>\"\n>\n</pdf-shy-button>\n", styles: [":host:focus{outline:none}button:focus{outline:none}svg:focus{outline:none}button#sidebarToggle{height:24px;width:24px;margin-right:5px!important}button{padding:0}\n"], dependencies: [{ kind: "component", type: i1.PdfShyButtonComponent, selector: "pdf-shy-button", inputs: ["primaryToolbarId", "secondaryMenuId", "cssClass", "eventBusName", "l10nId", "l10nLabel", "title", "toggled", "disabled", "order", "action", "closeOnClick", "onlySecondaryMenu", "image"] }, { kind: "pipe", type: i2.ResponsiveCSSClassPipe, name: "responsiveCSSClass" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.6", ngImport: i0, type: PdfToggleSidebarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'pdf-toggle-sidebar', template: "<pdf-shy-button\n  title=\"Toggle Sidebar\"\n  primaryToolbarId=\"primarySidebarToggle\"\n  [cssClass]=\"show | responsiveCSSClass : 'always-visible'\"\n  [toggled]=\"sidebarVisible === true\"\n  l10nId=\"pdfjs-toggle-sidebar-button\"\n  l10nLabel=\"pdfjs-toggle-sidebar-button-label\"\n  [order]=\"4500\"\n  [closeOnClick]=\"true\"\n  [action]=\"onClick\"\n  image=\"<svg width='24px' height='24px' viewBox='0 0 24 24'> <path fill='currentColor' d='M3,9H17V7H3V9M3,13H17V11H3V13M3,17H17V15H3V17M19,17H21V15H19V17M19,7V9H21V7H19M19,13H21V11H19V13Z' /> </svg>\"\n>\n</pdf-shy-button>\n", styles: [":host:focus{outline:none}button:focus{outline:none}svg:focus{outline:none}button#sidebarToggle{height:24px;width:24px;margin-right:5px!important}button{padding:0}\n"] }]
        }], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { show: [{
                type: Input
            }], sidebarVisible: [{
                type: Input
            }], showChange: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGRmLXRvZ2dsZS1zaWRlYmFyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1leHRlbmRlZC1wZGYtdmlld2VyL3NyYy9saWIvdG9vbGJhci9wZGYtdG9nZ2x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