import { ConnectionPositionPair } from '@angular/cdk/overlay';
import { Component, HostListener, Input, ViewChild } from '@angular/core';
import { HtmlTemplatesHelper } from '../../shared/util/helpers/html-templates.helper';
import * as i0 from "@angular/core";
import * as i1 from "../toolbar-event.service";
import * as i2 from "../toolbar-button-visibility.service";
import * as i3 from "../../../lib/shared/util/services/number.helper.service";
import * as i4 from "../icp-event.service";
import * as i5 from "@angular/common";
import * as i6 from "@angular/forms";
import * as i7 from "@angular/cdk/overlay";
import * as i8 from "../search-bar/search-bar.component";
import * as i9 from "../../shared/directives/tooltip-dismiss.directive";
import * as i10 from "rpx-xui-translation";
export class MainToolbarComponent {
    constructor(toolbarEvents, toolbarButtons, cdr, numberHelper, icpEventService) {
        this.toolbarEvents = toolbarEvents;
        this.toolbarButtons = toolbarButtons;
        this.cdr = cdr;
        this.numberHelper = numberHelper;
        this.icpEventService = icpEventService;
        this.enableAnnotations = false;
        this.enableRedactions = false;
        this.enableICP = false;
        this.contentType = null;
        this.subscriptions = [];
        this.icpEnabled = false;
        this.redactionEnabled = false;
        this.pageNumber = 1;
        this.pageCount = 0;
        this.isDropdownMenuOpen = false;
        this.isBookmarksOpen = false;
        this.isIndexOpen = false;
        this.isRedactOpen = false;
        this.isCommentsOpen = false;
        this.dropdownMenuPositions = [
            new ConnectionPositionPair({
                originX: 'end',
                originY: 'bottom'
            }, {
                overlayX: 'end',
                overlayY: 'top'
            }, 0, 3)
        ];
        this.zoomScales = [0.1, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 2.5, 3, 5];
        this.allButtonsWidth = 0;
        this.widthRequiredForBtn = {};
    }
    ngOnInit() {
        this.subscriptions.push(this.toolbarEvents.setCurrentPageSubject.subscribe(pageNumber => this.setCurrentPage(pageNumber)), this.toolbarEvents.setCurrentPageInputValueSubject.subscribe(pageNumber => this.pageNumber = pageNumber), this.toolbarEvents.getPageCount().subscribe(count => this.pageCount = count), this.icpEventService.enabled.subscribe(enabled => {
            this.icpEnabled = enabled;
            if (this.icpEnabled) {
                this.toolbarEvents.toggleCommentsPanel(!enabled);
                this.toolbarEvents.sidebarOpen.next(false);
            }
        }), this.toolbarEvents.redactionMode.subscribe(enabled => {
            this.redactionEnabled = enabled;
        }), this.toolbarEvents.redactAllInProgressSubject.subscribe(disable => {
            this.redactAllInProgress = disable;
        }));
    }
    ngOnDestroy() {
        for (const subscription of this.subscriptions) {
            subscription.unsubscribe();
        }
    }
    ngAfterViewInit() {
        Array.from(this.mvToolbarMain.nativeElement.children).forEach((button) => {
            this.allButtonsWidth += HtmlTemplatesHelper.getAdjustedBoundingRect(button).width;
            this.widthRequiredForBtn[button.id] = this.allButtonsWidth;
        });
        this.cdr.detectChanges();
    }
    onResize() {
        this.cdr.detectChanges();
    }
    onControlPrint(event) {
        event.preventDefault();
        this.printFile();
    }
    onClickHighlightToggle() {
        this.toolbarEvents.toggleHighlightToolbar();
    }
    onClickDrawToggle() {
        this.toolbarEvents.toggleDrawMode();
    }
    toggleIndexSideBar() {
        const sidebarOpen = this.toolbarEvents.sidebarOpen.getValue();
        const sidebarView = this.toolbarEvents.sidebarOutlineView.getValue();
        if (!(sidebarOpen && !sidebarView)) {
            this.toolbarEvents.toggleSideBar(!sidebarOpen);
        }
        this.toolbarEvents.toggleSideBarView(true);
        this.isIndexOpen = !this.isIndexOpen;
    }
    onToolBarOffSetChange(buttonId) {
        if (this.mvToolbarMain && this.mvToolbarMain.nativeElement.offsetWidth < this.widthRequiredForBtn[buttonId]) {
            return "button-hidden-on-toolbar";
        }
        return "button-hidden-on-dropdown";
    }
    toggleBookmarksSideBar() {
        const sidebarOpen = this.toolbarEvents.sidebarOpen.getValue();
        const sidebarView = this.toolbarEvents.sidebarOutlineView.getValue();
        if (!(sidebarOpen && sidebarView)) {
            this.toolbarEvents.toggleSideBar(!sidebarOpen);
        }
        this.toolbarEvents.toggleSideBarView(false);
        this.isBookmarksOpen = !this.isBookmarksOpen;
    }
    togglePresentBar() {
        this.toolbarEvents.searchBarHidden.next(true);
        this.icpEventService.enable();
    }
    increasePageNumber() {
        this.toolbarEvents.incrementPage(1);
    }
    decreasePageNumber() {
        this.toolbarEvents.incrementPage(-1);
    }
    onPageNumberInputChange(pageNumber) {
        if (Number(pageNumber) < 1) {
            pageNumber = '1';
        }
        if (Number(pageNumber) > this.pageCount) {
            pageNumber = this.pageCount.toString();
        }
        this.toolbarEvents.setPage(Number.parseInt(pageNumber, 10));
    }
    setCurrentPage(pageNumber) {
        this.pageNumber = pageNumber;
    }
    rotate(rotation) {
        this.toolbarEvents.rotate(rotation);
    }
    printFile() {
        this.toolbarEvents.print();
    }
    downloadFile() {
        this.toolbarEvents.download();
    }
    zoom(zoomFactor) {
        this.toolbarEvents.zoom(+zoomFactor);
    }
    stepZoom(zoomFactor) {
        this.toolbarEvents.stepZoom(zoomFactor);
        this.zoomSelect.nativeElement.selected = 'selected';
    }
    toggleCommentsPanel() {
        this.toolbarEvents.toggleCommentsPanel(!this.toolbarEvents.commentsPanelVisible.getValue());
        this.isCommentsOpen = !this.isCommentsOpen;
    }
    toggleRedactBar() {
        this.toolbarEvents.toggleRedactionMode();
        this.isRedactOpen = !this.isRedactOpen;
    }
    toggleGrabNDrag() {
        this.toolbarEvents.toggleGrabNDrag();
    }
    isPdf() {
        return this.contentType === 'pdf';
    }
    toggleSearchBar() {
        this.toolbarEvents.searchBarHidden.next(!this.toolbarEvents.searchBarHidden.getValue());
    }
    toggleMoreOptions() {
        this.isDropdownMenuOpen = !this.isDropdownMenuOpen;
        setTimeout(() => {
            if (this.mvMenuItems) {
                this.mvMenuItems.nativeElement.focus();
            }
        }, 100);
    }
    /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MainToolbarComponent, deps: [{ token: i1.ToolbarEventService }, { token: i2.ToolbarButtonVisibilityService }, { token: i0.ChangeDetectorRef }, { token: i3.NumberHelperService }, { token: i4.IcpEventService }], target: i0.ɵɵFactoryTarget.Component }); }
    /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MainToolbarComponent, selector: "mv-main-toolbar", inputs: { enableAnnotations: "enableAnnotations", enableRedactions: "enableRedactions", enableICP: "enableICP", contentType: "contentType" }, host: { listeners: { "window:resize": "onResize()", "document:keydown.control.p": "onControlPrint($event)", "document:keydown.meta.p": "onControlPrint($event)" } }, viewQueries: [{ propertyName: "zoomSelect", first: true, predicate: ["zoomSelect"], descendants: true }, { propertyName: "mvToolbarMain", first: true, predicate: ["mvToolbarMain"], descendants: true }, { propertyName: "mvMenuItems", first: true, predicate: ["dropdownMenu"], descendants: true }], ngImport: i0, template: "<div class=\"toolbar\">\n  <div id=\"toolbarContainer\">\n    <div class=\"mv-toolbar__container\">\n      <div #mvToolbar class=\"mv-toolbar\" [class.notSupported]=\"!contentType\">\n        <!-- The mvToolbarMain div contains all toolbar buttons except the \"More options\" button. This allows for calculation of the available space to display buttons -->\n        <div id=\"mvToolbarMain\" class=\"mv-toolbar-main\" #mvToolbarMain>\n          <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n        </div>\n        <!-- The mvToolbarMoreOptions div contains the \"More options\" toolbar button (and the overlay template for the dropdown menu).\n            The space occupied by the button (if visible) is excluded from the toolbar space available calculation -->\n        <div id=\"mvToolbarMoreOptions\" class=\"mv-toolbar-more-options\">\n          <button\n            id=\"mvMoreOptionsBtn\"\n            class=\"mv-button mv-toolbar__menu-button--more-options mv-tooltip\"\n            [class.mv-toolbar__menu-button--more-options__hidden]=\"\n              mvToolbar.offsetWidth >= allButtonsWidth\n            \"\n            [attr.aria-expanded]=\"isDropdownMenuOpen\"\n            [attr.data-tooltip]=\"'More options' | rpxTranslate\"\n            (click)=\"toggleMoreOptions()\"\n            cdkOverlayOrigin\n            #trigger=\"cdkOverlayOrigin\"\n            [disabled]=\"redactAllInProgress\"\n          >\n            <span>{{ \"More options\" | rpxTranslate }}</span>\n          </button>\n          <!-- This template displays the overlay content for the dropdown menu and is connected to the \"More options\" button -->\n          <ng-template\n            cdkConnectedOverlay\n            [cdkConnectedOverlayOrigin]=\"trigger\"\n            [cdkConnectedOverlayOpen]=\"isDropdownMenuOpen\"\n            [cdkConnectedOverlayPositions]=\"dropdownMenuPositions\"\n          >\n            <div class=\"dropdown-menu\" #dropdownMenu tabindex=\"0\">\n              <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n            </div>\n          </ng-template>\n        </div>\n      </div>\n      <div id=\"mvMenuItems\" #mvMenuItems>\n        <ng-template #menuItems>\n          <button\n            *ngIf=\"toolbarButtons.showSidebar\"\n            id=\"mvIndexBtn\"\n            data-l10n-id=\"index\"\n            [attr.data-tooltip]=\"'Index' | rpxTranslate\"\n            #mvIndexBtn\n            class=\"mv-button mv-toolbar__menu-button--index mv-tooltip\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvIndexBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvIndexBtn']\n            \"\n            [attr.aria-expanded]=\"isIndexOpen\"\n            [disabled]=\"redactAllInProgress\"\n            (click)=\"toggleIndexSideBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Index\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showSidebar\"\n            id=\"mvBookmarksBtn\"\n            data-l10n-id=\"bookmarks\"\n            [attr.data-tooltip]=\"'Bookmarks' | rpxTranslate\"\n            #mvBookmarksBtn\n            [ngClass]=\"{\n              'mv-button mv-tooltip mv-toolbar__menu-button--bookmarks': true,\n              'button-hidden-on-toolbar':\n                mvToolbarMain.offsetWidth <\n                widthRequiredForBtn['mvBookmarksBtn'],\n              'button-hidden-on-dropdown':\n                mvToolbarMain.offsetWidth >=\n                widthRequiredForBtn['mvBookmarksBtn']\n            }\"\n            [attr.aria-expanded]=\"isBookmarksOpen\"\n            [disabled]=\"redactAllInProgress\"\n            (click)=\"toggleBookmarksSideBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Bookmarks\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showDrawButton\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvDrawBtn\"\n            #mvDrawBtn\n            class=\"mv-button mv-toolbar__menu-button--draw mv-tooltip\"\n            [attr.data-tooltip]=\"'Draw a box' | rpxTranslate\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDrawBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDrawBtn']\n            \"\n            [class.toggled]=\"toolbarEvents.drawModeSubject | async\"\n            aria-pressed=\"false\"\n            data-l10n-id=\"toggleDrawButton\"\n            (click)=\"onClickDrawToggle(); isDropdownMenuOpen = false\"\n          >\n            <span data-l10n-id=\"draw_label\">{{\n              \"Draw a box\" | rpxTranslate\n            }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showHighlightButton\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvHighlightBtn\"\n            #mvHighlightBtn\n            class=\"mv-button mv-toolbar__menu-button--highlight mv-tooltip\"\n            [attr.data-tooltip]=\"'Highlight' | rpxTranslate\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvHighlightBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvHighlightBtn']\n            \"\n            [class.toggled]=\"toolbarEvents.highlightToolbarSubject | async\"\n            aria-pressed=\"false\"\n            (click)=\"onClickHighlightToggle(); isDropdownMenuOpen = false\"\n            data-l10n-id=\"toggleHighlightButton\"\n          >\n            <span data-l10n-id=\"highlight_label\">{{\n              \"Highlight\" | rpxTranslate\n            }}</span>\n          </button>\n\n          <ng-container *ngIf=\"toolbarButtons.showNavigation\">\n            <div\n              id=\"mvPageBtn\"\n              #mvPageBtn\n              class=\"mv-toolbar__menu-button--page\"\n              [attr.data-tooltip]=\"'Page' | rpxTranslate\"\n              [class.button-hidden-on-toolbar]=\"\n                mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPageBtn']\n              \"\n              [class.button-hidden-on-dropdown]=\"\n                mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPageBtn']\n              \"\n            >\n              <span>{{ \"Page\" | rpxTranslate }}</span>\n\n              <button\n                id=\"mvUpBtn\"\n                [disabled]=\"pageNumber === 1 || redactAllInProgress\"\n                [attr.data-tooltip]=\"'Previous page' | rpxTranslate\"\n                [attr.aria-label]=\"'Previous page' | rpxTranslate\"\n                class=\"mv-toolbar__menu-button--up button-image mv-tooltip\"\n                data-l10n-id=\"previous\"\n                (click)=\"decreasePageNumber()\"\n                [disabled]=\"redactAllInProgress\"\n              >\n                <span></span>\n              </button>\n              <button\n                id=\"mvDownBtn\"\n                [disabled]=\"pageNumber === pageCount || redactAllInProgress\"\n                [attr.data-tooltip]=\"'Next page' | rpxTranslate\"\n                [attr.aria-label]=\"'Next page' | rpxTranslate\"\n                class=\"mv-toolbar__menu-button--down button-image mv-tooltip\"\n                data-l10n-id=\"next\"\n                (click)=\"increasePageNumber()\"\n              >\n                <span></span>\n              </button>\n\n              <span class=\"mv-tooltip\" [attr.data-tooltip]=\"'Page number' | rpxTranslate\">\n                <input\n                  type=\"number\"\n                  id=\"pageNumber\"\n                  class=\"hmcts-toolbar-input govuk-input--width-2\"\n                  [attr.aria-label]=\"'Page number' | rpxTranslate\"\n                  value=\"1\"\n                  size=\"4\"\n                  min=\"1\"\n                  [value]=\"pageNumber\"\n                  tabindex=\"0\"\n                  data-l10n-id=\"page\"\n                  (change)=\"onPageNumberInputChange(pageNumberInput.value)\"\n                  [disabled]=\"redactAllInProgress\"\n                  #pageNumberInput\n                />\n              </span>\n              <span id=\"numPages\" class=\"toolbarLabel\">/ {{ pageCount }}</span>\n            </div>\n          </ng-container>\n\n          <ng-container *ngIf=\"toolbarButtons.showZoom\">\n            <div\n              id=\"mvZoomBtn\"\n              #mvZoomBtn\n              class=\"mv-toolbar__menu-button--zoom\"\n              aria-pressed=\"false\"\n              [class.button-hidden-on-toolbar]=\"\n                mvToolbarMain.offsetWidth < widthRequiredForBtn['mvZoomBtn']\n              \"\n              [class.button-hidden-on-dropdown]=\"\n                mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvZoomBtn']\n              \"\n            >\n              <button\n                [disabled]=\"\n                  toolbarEvents.zoomValueSubject.value === 0.1 ||\n                  redactAllInProgress\n                \"\n                id=\"mvMinusBtn\"\n                class=\"mv-toolbar__menu-button--zoom-out button-image mv-tooltip\"\n                [attr.data-tooltip]=\"'Zoom out' | rpxTranslate\"\n                data-l10n-id=\"zoom_out\"\n                (click)=\"stepZoom(-0.1)\"\n              >\n                <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n                  \"Zoom Out\" | rpxTranslate\n                }}</span>\n              </button>\n              <span class=\"mv-tooltip\" [attr.data-tooltip]=\"'Zoom' | rpxTranslate\"> \n                <select\n                  id=\"scaleSelect\"\n                  class=\"hmcts-toolbar-select\"\n                  data-l10n-id=\"zoom\"\n                  (change)=\"zoom($event.target.value)\"\n                  tabindex=\"0\"\n                  [disabled]=\"redactAllInProgress\"\n                >\n                  <option\n                    #zoomSelect\n                    id=\"customScaleOption\"\n                    title=\"\"\n                    [value]=\"toolbarEvents.zoomValueSubject.value\"\n                  >\n                    {{\n                      toolbarEvents.zoomValueSubject.value * 100\n                        | number : \"1.0-0\"\n                    }}%\n                  </option>\n                  <option\n                    *ngFor=\"let zoomScale of zoomScales\"\n                    title=\"\"\n                    [value]=\"zoomScale\"\n                    [attr.data-l10n-id]=\"'page_scale_percent_' + zoomScale * 100\"\n                  >\n                    {{ zoomScale * 100 }}%\n                  </option>\n                </select>\n              </span>\n              <button\n                [disabled]=\"\n                  toolbarEvents.zoomValueSubject.value === 5 ||\n                  redactAllInProgress\n                \"\n                id=\"mvPlusBtn\"\n                class=\"mv-toolbar__menu-button--zoom-in button-image mv-tooltip\"\n                (click)=\"stepZoom(0.1)\"\n                [attr.data-tooltip]=\"'Zoom in' | rpxTranslate\"\n                data-l10n-id=\"zoom_in\"\n              >\n                <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n                  \"Zoom In\" | rpxTranslate\n                }}</span>\n              </button>\n            </div>\n          </ng-container>\n\n          <div\n            *ngIf=\"toolbarButtons.showRotate\"\n            id=\"mvRotateBtn\"\n            #mvRotateBtn\n            class=\"mv-toolbar__menu-button--rotate\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRotateBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRotateBtn']\n            \"\n          >\n            <button\n              id=\"mvRotateLeftBtn\"\n              class=\"mv-toolbar__menu-button--rotate_left button-image mv-tooltip\"\n              [attr.aria-label]=\"'Rotate counterclockwise' | rpxTranslate\"\n              [attr.data-tooltip]=\"'Rotate counterclockwise' | rpxTranslate\"\n              data-l10n-id=\"page_rotate_ccw\"\n              (click)=\"rotate(270)\"\n              [disabled]=\"redactAllInProgress\"\n            >\n              <span></span>\n            </button>\n            <button\n              id=\"mvRotateRightBtn\"\n              class=\"mv-toolbar__menu-button--rotate_right button-image mv-tooltip\"\n              [attr.aria-label]=\"'Rotate clockwise' | rpxTranslate\"\n              [attr.data-tooltip]=\"'Rotate clockwise' | rpxTranslate\"\n              data-l10n-id=\"page_rotate_cw\"\n              (click)=\"rotate(90)\"\n              [disabled]=\"redactAllInProgress\"\n            >\n              <span></span>\n            </button>\n            <span>{{ \"Rotate\" | rpxTranslate }}</span>\n          </div>\n\n          <button\n            *ngIf=\"toolbarButtons.showSearchBar\"\n            [disabled]=\"icpEnabled || redactAllInProgress\"\n            id=\"mvSearchBtn\"\n            #mvSearchBtn\n            [attr.data-tooltip]=\"'Search' | rpxTranslate\"\n            data-l10n-id=\"searchbar\"\n            class=\"mv-button mv-toolbar__menu-button--search mv-tooltip\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvSearchBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvSearchBtn']\n            \"\n            aria-pressed=\"false\"\n            (click)=\"toggleSearchBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Search\" | rpxTranslate }}</span>\n          </button>\n          <mv-search-bar\n            *ngIf=\"!toolbarEvents.searchBarHidden.getValue()\"\n          ></mv-search-bar>\n\n          <button\n            *ngIf=\"enableICP && toolbarButtons.showPresentationMode && isPdf()\"\n            [disabled]=\"icpEnabled || !contentType || redactionEnabled\"\n            id=\"mvPresentBtn\"\n            #mvPresentBtn\n            class=\"mv-button mv-toolbar__menu-button--present mv-tooltip\"\n            [attr.data-tooltip]=\"'In-Court presentation mode' | rpxTranslate\"\n            data-l10n-id=\"icpMode_label\"\n            [ngClass]=\"onToolBarOffSetChange('mvPresentBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"togglePresentBar(); isDropdownMenuOpen = false\"\n          >\n            <span data-l10n-id=\"icpMode_label\">{{\n              \"Present\" | rpxTranslate\n            }}</span>\n          </button>\n\n          <button\n            *ngIf=\"enableRedactions && toolbarButtons.showRedact\"\n            [disabled]=\"icpEnabled || redactAllInProgress\"\n            id=\"mvRedactBtn\"\n            #mvRedactBtn\n            [attr.data-tooltip]=\"'Redact' | rpxTranslate\"\n            data-l10n-id=\"redact\"\n            class=\"mv-button mv-toolbar__menu-button--redact mv-tooltip\"\n            [ngClass]=\"onToolBarOffSetChange('mvRedactBtn')\"\n            [attr.aria-expanded]=\"isRedactOpen\"\n            (click)=\"toggleRedactBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Redact\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showGrabNDragButton\"\n            [disabled]=\"icpEnabled || redactAllInProgress\"\n            id=\"mvGrabBtn\"\n            #mvGrabBtn\n            class=\"mv-button mv-toolbar__menu-button--grab mv-tooltip\"\n            data-tooltip=\"Grab and drag\"\n            [ngClass]=\"onToolBarOffSetChange('mvGrabBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"toggleGrabNDrag(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Grab and drag\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showDownload\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvDownloadBtn\"\n            #mvDownloadBtn\n            class=\"mv-button mv-toolbar__menu-button--download mv-tooltip\"\n            [attr.data-tooltip]=\"'Download' | rpxTranslate\"\n            data-l10n-id=\"download\"\n            [ngClass]=\"onToolBarOffSetChange('mvDownloadBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"downloadFile(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Download\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showPrint\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvPrintBtn\"\n            #mvPrintBtn\n            data-l10n-id=\"print\"\n            aria-label=\"Print\"\n            [attr.data-tooltip]=\"'Print' | rpxTranslate\"\n            data-l10n-id=\"print\"\n            class=\"mv-button mv-toolbar__menu-button--print mv-tooltip\"\n            [ngClass]=\"onToolBarOffSetChange('mvPrintBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"printFile(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Print\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"enableAnnotations && toolbarButtons.showCommentSummary\"\n            [disabled]=\"redactionEnabled\"\n            id=\"mvCommentsBtn\"\n            #mvCommentsBtn\n            class=\"mv-button mv-toolbar__menu-button--comments mv-tooltip\"\n            [attr.data-tooltip]=\"'Comments' | rpxTranslate\"\n            data-l10n-id=\"comments\"\n            [ngClass]=\"onToolBarOffSetChange('mvCommentsBtn')\"\n            [attr.aria-expanded]=\"isCommentsOpen\"\n            (click)=\"toggleCommentsPanel(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Comments\" | rpxTranslate }}</span>\n          </button>\n        </ng-template>\n      </div>\n    </div>\n\n    <div id=\"loadingBar\">\n      <div class=\"progress\">\n        <div class=\"glimmer\"></div>\n      </div>\n    </div>\n  </div>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i6.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i7.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i7.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: i8.SearchBarComponent, selector: "mv-search-bar" }, { kind: "directive", type: i9.TooltipDismissDirective, selector: ".mv-tooltip, [mvTooltipDismiss]" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.DecimalPipe, name: "number" }, { kind: "pipe", type: i10.RpxTranslatePipe, name: "rpxTranslate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MainToolbarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'mv-main-toolbar', template: "<div class=\"toolbar\">\n  <div id=\"toolbarContainer\">\n    <div class=\"mv-toolbar__container\">\n      <div #mvToolbar class=\"mv-toolbar\" [class.notSupported]=\"!contentType\">\n        <!-- The mvToolbarMain div contains all toolbar buttons except the \"More options\" button. This allows for calculation of the available space to display buttons -->\n        <div id=\"mvToolbarMain\" class=\"mv-toolbar-main\" #mvToolbarMain>\n          <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n        </div>\n        <!-- The mvToolbarMoreOptions div contains the \"More options\" toolbar button (and the overlay template for the dropdown menu).\n            The space occupied by the button (if visible) is excluded from the toolbar space available calculation -->\n        <div id=\"mvToolbarMoreOptions\" class=\"mv-toolbar-more-options\">\n          <button\n            id=\"mvMoreOptionsBtn\"\n            class=\"mv-button mv-toolbar__menu-button--more-options mv-tooltip\"\n            [class.mv-toolbar__menu-button--more-options__hidden]=\"\n              mvToolbar.offsetWidth >= allButtonsWidth\n            \"\n            [attr.aria-expanded]=\"isDropdownMenuOpen\"\n            [attr.data-tooltip]=\"'More options' | rpxTranslate\"\n            (click)=\"toggleMoreOptions()\"\n            cdkOverlayOrigin\n            #trigger=\"cdkOverlayOrigin\"\n            [disabled]=\"redactAllInProgress\"\n          >\n            <span>{{ \"More options\" | rpxTranslate }}</span>\n          </button>\n          <!-- This template displays the overlay content for the dropdown menu and is connected to the \"More options\" button -->\n          <ng-template\n            cdkConnectedOverlay\n            [cdkConnectedOverlayOrigin]=\"trigger\"\n            [cdkConnectedOverlayOpen]=\"isDropdownMenuOpen\"\n            [cdkConnectedOverlayPositions]=\"dropdownMenuPositions\"\n          >\n            <div class=\"dropdown-menu\" #dropdownMenu tabindex=\"0\">\n              <ng-container *ngTemplateOutlet=\"menuItems\"></ng-container>\n            </div>\n          </ng-template>\n        </div>\n      </div>\n      <div id=\"mvMenuItems\" #mvMenuItems>\n        <ng-template #menuItems>\n          <button\n            *ngIf=\"toolbarButtons.showSidebar\"\n            id=\"mvIndexBtn\"\n            data-l10n-id=\"index\"\n            [attr.data-tooltip]=\"'Index' | rpxTranslate\"\n            #mvIndexBtn\n            class=\"mv-button mv-toolbar__menu-button--index mv-tooltip\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvIndexBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvIndexBtn']\n            \"\n            [attr.aria-expanded]=\"isIndexOpen\"\n            [disabled]=\"redactAllInProgress\"\n            (click)=\"toggleIndexSideBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Index\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showSidebar\"\n            id=\"mvBookmarksBtn\"\n            data-l10n-id=\"bookmarks\"\n            [attr.data-tooltip]=\"'Bookmarks' | rpxTranslate\"\n            #mvBookmarksBtn\n            [ngClass]=\"{\n              'mv-button mv-tooltip mv-toolbar__menu-button--bookmarks': true,\n              'button-hidden-on-toolbar':\n                mvToolbarMain.offsetWidth <\n                widthRequiredForBtn['mvBookmarksBtn'],\n              'button-hidden-on-dropdown':\n                mvToolbarMain.offsetWidth >=\n                widthRequiredForBtn['mvBookmarksBtn']\n            }\"\n            [attr.aria-expanded]=\"isBookmarksOpen\"\n            [disabled]=\"redactAllInProgress\"\n            (click)=\"toggleBookmarksSideBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Bookmarks\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showDrawButton\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvDrawBtn\"\n            #mvDrawBtn\n            class=\"mv-button mv-toolbar__menu-button--draw mv-tooltip\"\n            [attr.data-tooltip]=\"'Draw a box' | rpxTranslate\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvDrawBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvDrawBtn']\n            \"\n            [class.toggled]=\"toolbarEvents.drawModeSubject | async\"\n            aria-pressed=\"false\"\n            data-l10n-id=\"toggleDrawButton\"\n            (click)=\"onClickDrawToggle(); isDropdownMenuOpen = false\"\n          >\n            <span data-l10n-id=\"draw_label\">{{\n              \"Draw a box\" | rpxTranslate\n            }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showHighlightButton\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvHighlightBtn\"\n            #mvHighlightBtn\n            class=\"mv-button mv-toolbar__menu-button--highlight mv-tooltip\"\n            [attr.data-tooltip]=\"'Highlight' | rpxTranslate\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvHighlightBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvHighlightBtn']\n            \"\n            [class.toggled]=\"toolbarEvents.highlightToolbarSubject | async\"\n            aria-pressed=\"false\"\n            (click)=\"onClickHighlightToggle(); isDropdownMenuOpen = false\"\n            data-l10n-id=\"toggleHighlightButton\"\n          >\n            <span data-l10n-id=\"highlight_label\">{{\n              \"Highlight\" | rpxTranslate\n            }}</span>\n          </button>\n\n          <ng-container *ngIf=\"toolbarButtons.showNavigation\">\n            <div\n              id=\"mvPageBtn\"\n              #mvPageBtn\n              class=\"mv-toolbar__menu-button--page\"\n              [attr.data-tooltip]=\"'Page' | rpxTranslate\"\n              [class.button-hidden-on-toolbar]=\"\n                mvToolbarMain.offsetWidth < widthRequiredForBtn['mvPageBtn']\n              \"\n              [class.button-hidden-on-dropdown]=\"\n                mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvPageBtn']\n              \"\n            >\n              <span>{{ \"Page\" | rpxTranslate }}</span>\n\n              <button\n                id=\"mvUpBtn\"\n                [disabled]=\"pageNumber === 1 || redactAllInProgress\"\n                [attr.data-tooltip]=\"'Previous page' | rpxTranslate\"\n                [attr.aria-label]=\"'Previous page' | rpxTranslate\"\n                class=\"mv-toolbar__menu-button--up button-image mv-tooltip\"\n                data-l10n-id=\"previous\"\n                (click)=\"decreasePageNumber()\"\n                [disabled]=\"redactAllInProgress\"\n              >\n                <span></span>\n              </button>\n              <button\n                id=\"mvDownBtn\"\n                [disabled]=\"pageNumber === pageCount || redactAllInProgress\"\n                [attr.data-tooltip]=\"'Next page' | rpxTranslate\"\n                [attr.aria-label]=\"'Next page' | rpxTranslate\"\n                class=\"mv-toolbar__menu-button--down button-image mv-tooltip\"\n                data-l10n-id=\"next\"\n                (click)=\"increasePageNumber()\"\n              >\n                <span></span>\n              </button>\n\n              <span class=\"mv-tooltip\" [attr.data-tooltip]=\"'Page number' | rpxTranslate\">\n                <input\n                  type=\"number\"\n                  id=\"pageNumber\"\n                  class=\"hmcts-toolbar-input govuk-input--width-2\"\n                  [attr.aria-label]=\"'Page number' | rpxTranslate\"\n                  value=\"1\"\n                  size=\"4\"\n                  min=\"1\"\n                  [value]=\"pageNumber\"\n                  tabindex=\"0\"\n                  data-l10n-id=\"page\"\n                  (change)=\"onPageNumberInputChange(pageNumberInput.value)\"\n                  [disabled]=\"redactAllInProgress\"\n                  #pageNumberInput\n                />\n              </span>\n              <span id=\"numPages\" class=\"toolbarLabel\">/ {{ pageCount }}</span>\n            </div>\n          </ng-container>\n\n          <ng-container *ngIf=\"toolbarButtons.showZoom\">\n            <div\n              id=\"mvZoomBtn\"\n              #mvZoomBtn\n              class=\"mv-toolbar__menu-button--zoom\"\n              aria-pressed=\"false\"\n              [class.button-hidden-on-toolbar]=\"\n                mvToolbarMain.offsetWidth < widthRequiredForBtn['mvZoomBtn']\n              \"\n              [class.button-hidden-on-dropdown]=\"\n                mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvZoomBtn']\n              \"\n            >\n              <button\n                [disabled]=\"\n                  toolbarEvents.zoomValueSubject.value === 0.1 ||\n                  redactAllInProgress\n                \"\n                id=\"mvMinusBtn\"\n                class=\"mv-toolbar__menu-button--zoom-out button-image mv-tooltip\"\n                [attr.data-tooltip]=\"'Zoom out' | rpxTranslate\"\n                data-l10n-id=\"zoom_out\"\n                (click)=\"stepZoom(-0.1)\"\n              >\n                <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n                  \"Zoom Out\" | rpxTranslate\n                }}</span>\n              </button>\n              <span class=\"mv-tooltip\" [attr.data-tooltip]=\"'Zoom' | rpxTranslate\"> \n                <select\n                  id=\"scaleSelect\"\n                  class=\"hmcts-toolbar-select\"\n                  data-l10n-id=\"zoom\"\n                  (change)=\"zoom($event.target.value)\"\n                  tabindex=\"0\"\n                  [disabled]=\"redactAllInProgress\"\n                >\n                  <option\n                    #zoomSelect\n                    id=\"customScaleOption\"\n                    title=\"\"\n                    [value]=\"toolbarEvents.zoomValueSubject.value\"\n                  >\n                    {{\n                      toolbarEvents.zoomValueSubject.value * 100\n                        | number : \"1.0-0\"\n                    }}%\n                  </option>\n                  <option\n                    *ngFor=\"let zoomScale of zoomScales\"\n                    title=\"\"\n                    [value]=\"zoomScale\"\n                    [attr.data-l10n-id]=\"'page_scale_percent_' + zoomScale * 100\"\n                  >\n                    {{ zoomScale * 100 }}%\n                  </option>\n                </select>\n              </span>\n              <button\n                [disabled]=\"\n                  toolbarEvents.zoomValueSubject.value === 5 ||\n                  redactAllInProgress\n                \"\n                id=\"mvPlusBtn\"\n                class=\"mv-toolbar__menu-button--zoom-in button-image mv-tooltip\"\n                (click)=\"stepZoom(0.1)\"\n                [attr.data-tooltip]=\"'Zoom in' | rpxTranslate\"\n                data-l10n-id=\"zoom_in\"\n              >\n                <span class=\"mv-toolbar__menu-button--zoom-out-text\">{{\n                  \"Zoom In\" | rpxTranslate\n                }}</span>\n              </button>\n            </div>\n          </ng-container>\n\n          <div\n            *ngIf=\"toolbarButtons.showRotate\"\n            id=\"mvRotateBtn\"\n            #mvRotateBtn\n            class=\"mv-toolbar__menu-button--rotate\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvRotateBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvRotateBtn']\n            \"\n          >\n            <button\n              id=\"mvRotateLeftBtn\"\n              class=\"mv-toolbar__menu-button--rotate_left button-image mv-tooltip\"\n              [attr.aria-label]=\"'Rotate counterclockwise' | rpxTranslate\"\n              [attr.data-tooltip]=\"'Rotate counterclockwise' | rpxTranslate\"\n              data-l10n-id=\"page_rotate_ccw\"\n              (click)=\"rotate(270)\"\n              [disabled]=\"redactAllInProgress\"\n            >\n              <span></span>\n            </button>\n            <button\n              id=\"mvRotateRightBtn\"\n              class=\"mv-toolbar__menu-button--rotate_right button-image mv-tooltip\"\n              [attr.aria-label]=\"'Rotate clockwise' | rpxTranslate\"\n              [attr.data-tooltip]=\"'Rotate clockwise' | rpxTranslate\"\n              data-l10n-id=\"page_rotate_cw\"\n              (click)=\"rotate(90)\"\n              [disabled]=\"redactAllInProgress\"\n            >\n              <span></span>\n            </button>\n            <span>{{ \"Rotate\" | rpxTranslate }}</span>\n          </div>\n\n          <button\n            *ngIf=\"toolbarButtons.showSearchBar\"\n            [disabled]=\"icpEnabled || redactAllInProgress\"\n            id=\"mvSearchBtn\"\n            #mvSearchBtn\n            [attr.data-tooltip]=\"'Search' | rpxTranslate\"\n            data-l10n-id=\"searchbar\"\n            class=\"mv-button mv-toolbar__menu-button--search mv-tooltip\"\n            [class.button-hidden-on-toolbar]=\"\n              mvToolbarMain.offsetWidth < widthRequiredForBtn['mvSearchBtn']\n            \"\n            [class.button-hidden-on-dropdown]=\"\n              mvToolbarMain.offsetWidth >= widthRequiredForBtn['mvSearchBtn']\n            \"\n            aria-pressed=\"false\"\n            (click)=\"toggleSearchBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Search\" | rpxTranslate }}</span>\n          </button>\n          <mv-search-bar\n            *ngIf=\"!toolbarEvents.searchBarHidden.getValue()\"\n          ></mv-search-bar>\n\n          <button\n            *ngIf=\"enableICP && toolbarButtons.showPresentationMode && isPdf()\"\n            [disabled]=\"icpEnabled || !contentType || redactionEnabled\"\n            id=\"mvPresentBtn\"\n            #mvPresentBtn\n            class=\"mv-button mv-toolbar__menu-button--present mv-tooltip\"\n            [attr.data-tooltip]=\"'In-Court presentation mode' | rpxTranslate\"\n            data-l10n-id=\"icpMode_label\"\n            [ngClass]=\"onToolBarOffSetChange('mvPresentBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"togglePresentBar(); isDropdownMenuOpen = false\"\n          >\n            <span data-l10n-id=\"icpMode_label\">{{\n              \"Present\" | rpxTranslate\n            }}</span>\n          </button>\n\n          <button\n            *ngIf=\"enableRedactions && toolbarButtons.showRedact\"\n            [disabled]=\"icpEnabled || redactAllInProgress\"\n            id=\"mvRedactBtn\"\n            #mvRedactBtn\n            [attr.data-tooltip]=\"'Redact' | rpxTranslate\"\n            data-l10n-id=\"redact\"\n            class=\"mv-button mv-toolbar__menu-button--redact mv-tooltip\"\n            [ngClass]=\"onToolBarOffSetChange('mvRedactBtn')\"\n            [attr.aria-expanded]=\"isRedactOpen\"\n            (click)=\"toggleRedactBar(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Redact\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showGrabNDragButton\"\n            [disabled]=\"icpEnabled || redactAllInProgress\"\n            id=\"mvGrabBtn\"\n            #mvGrabBtn\n            class=\"mv-button mv-toolbar__menu-button--grab mv-tooltip\"\n            data-tooltip=\"Grab and drag\"\n            [ngClass]=\"onToolBarOffSetChange('mvGrabBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"toggleGrabNDrag(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Grab and drag\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showDownload\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvDownloadBtn\"\n            #mvDownloadBtn\n            class=\"mv-button mv-toolbar__menu-button--download mv-tooltip\"\n            [attr.data-tooltip]=\"'Download' | rpxTranslate\"\n            data-l10n-id=\"download\"\n            [ngClass]=\"onToolBarOffSetChange('mvDownloadBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"downloadFile(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Download\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"toolbarButtons.showPrint\"\n            [disabled]=\"icpEnabled || redactionEnabled\"\n            id=\"mvPrintBtn\"\n            #mvPrintBtn\n            data-l10n-id=\"print\"\n            aria-label=\"Print\"\n            [attr.data-tooltip]=\"'Print' | rpxTranslate\"\n            data-l10n-id=\"print\"\n            class=\"mv-button mv-toolbar__menu-button--print mv-tooltip\"\n            [ngClass]=\"onToolBarOffSetChange('mvPrintBtn')\"\n            aria-pressed=\"false\"\n            (click)=\"printFile(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Print\" | rpxTranslate }}</span>\n          </button>\n\n          <button\n            *ngIf=\"enableAnnotations && toolbarButtons.showCommentSummary\"\n            [disabled]=\"redactionEnabled\"\n            id=\"mvCommentsBtn\"\n            #mvCommentsBtn\n            class=\"mv-button mv-toolbar__menu-button--comments mv-tooltip\"\n            [attr.data-tooltip]=\"'Comments' | rpxTranslate\"\n            data-l10n-id=\"comments\"\n            [ngClass]=\"onToolBarOffSetChange('mvCommentsBtn')\"\n            [attr.aria-expanded]=\"isCommentsOpen\"\n            (click)=\"toggleCommentsPanel(); isDropdownMenuOpen = false\"\n          >\n            <span>{{ \"Comments\" | rpxTranslate }}</span>\n          </button>\n        </ng-template>\n      </div>\n    </div>\n\n    <div id=\"loadingBar\">\n      <div class=\"progress\">\n        <div class=\"glimmer\"></div>\n      </div>\n    </div>\n  </div>\n</div>\n" }]
        }], ctorParameters: () => [{ type: i1.ToolbarEventService }, { type: i2.ToolbarButtonVisibilityService }, { type: i0.ChangeDetectorRef }, { type: i3.NumberHelperService }, { type: i4.IcpEventService }], propDecorators: { enableAnnotations: [{
                type: Input
            }], enableRedactions: [{
                type: Input
            }], enableICP: [{
                type: Input
            }], contentType: [{
                type: Input
            }], zoomSelect: [{
                type: ViewChild,
                args: ['zoomSelect', { static: false }]
            }], mvToolbarMain: [{
                type: ViewChild,
                args: ['mvToolbarMain', { static: false }]
            }], mvMenuItems: [{
                type: ViewChild,
                args: ['dropdownMenu', { static: false }]
            }], onResize: [{
                type: HostListener,
                args: ['window:resize', []]
            }], onControlPrint: [{
                type: HostListener,
                args: ['document:keydown.control.p', ['$event']]
            }, {
                type: HostListener,
                args: ['document:keydown.meta.p', ['$event']]
            }] } });
//# sourceMappingURL=data:application/json;base64, 