import { __decorate } from "tslib";
import { Component, Input, Output, EventEmitter } from '@angular/core';
var ItemNotesComponent = /** @class */ (function () {
    function ItemNotesComponent() {
        this.updatedNotes = new EventEmitter();
        this.updateResetValue = new EventEmitter();
    }
    ItemNotesComponent.prototype.ngOnChanges = function (changes) {
        if (this.resetFeature) {
            this.canShowNotes = false;
        }
    };
    ItemNotesComponent.prototype.ngOnInit = function () { };
    /**
     * to delete notes
     */
    ItemNotesComponent.prototype.deleteNotes = function () {
        this.currentNotes = '';
        this.updatedNotes.emit(this.currentNotes);
    };
    /**
     * to add notes and close notes dialog box
     */
    ItemNotesComponent.prototype.updateNotesAndClose = function () {
        this.canShowNotes = false;
        this.updatedNotes.emit(this.currentNotes);
    };
    /**
     * to show notes dialog box
     */
    ItemNotesComponent.prototype.showNotesDialogBox = function () {
        this.updateResetValue.emit();
        this.canShowNotes = !this.canShowNotes;
    };
    __decorate([
        Input()
    ], ItemNotesComponent.prototype, "currentNotes", void 0);
    __decorate([
        Input()
    ], ItemNotesComponent.prototype, "resetFeature", void 0);
    __decorate([
        Output()
    ], ItemNotesComponent.prototype, "updatedNotes", void 0);
    __decorate([
        Output()
    ], ItemNotesComponent.prototype, "updateResetValue", void 0);
    ItemNotesComponent = __decorate([
        Component({
            selector: 'wkqp-item-notes',
            template: "<div class=\"qp-feature-menu\">\n  <div class=\"notes-menu\">\n    <!--Notes-->\n    <button (click)=\"showNotesDialogBox()\">\n      <span\n        ><img alt=\"Question Notes\" src=\"assets/engine-icons/notes-icon.png\" />\n      </span>\n      <span class=\"pt3\">Notes</span>\n    </button>\n\n    <!--Notes Content-->\n    <div *ngIf=\"canShowNotes && !resetFeature\" class=\"notes-modal\">\n      <div class=\"examTaker-notes\">\n        <div class=\"examTaker-notes-title\">\n          Add Item Notes\n          <a (click)=\"canShowNotes = false\" class=\"examTaker-notes-close\">\n            <img\n              alt=\"Dialog-Close\"\n              (click)=\"canShowNotes = false\"\n              src=\"assets/engine-icons/close-icon.gif\"\n          /></a>\n        </div>\n        <div class=\"examTaker-notes-content\">\n          <textarea\n            id=\"ember1521\"\n            [(ngModel)]=\"currentNotes\"\n            class=\"examTaker-notes-input ember-view ember-text-area\"\n          ></textarea>\n          <div class=\"examTaker-notes-controls\">\n            <button\n              class=\"examTaker-notes-control save\"\n              (click)=\"updateNotesAndClose()\"\n            >\n              Save and Close\n            </button>\n            <button\n              class=\"examTaker-notes-control clear\"\n              (click)=\"deleteNotes()\"\n            >\n              Delete Notes\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
            styles: [".examTaker-header-region-right-inner .examTaker-nav-button._notes{display:inline-block}.examTaker-nav-button-text{white-space:nowrap;color:#fff!important}.examTaker-header-region-right-inner .examTaker-nav-button._text_zoom .examTaker-nav-button-text-zoom{display:flex;margin-bottom:3px}.route-sessionsSessionBlockTake:not(._font-big):not(._font-medium) .examTaker-nav-button-text-zoom-button._big,.route-sessionsSessionBlockTake:not(._font-big):not(._font-medium) .examTaker-nav-button-text-zoom-button._medium,.route-sessionsSessionBlockTake:not(._font-big):not(._font-medium) .examTaker-nav-button-text-zoom-button._small{background-color:#fcfcfc;border-color:#fff!important;color:#000}.examTaker-header-region-right-inner .examTaker-nav-button._text_zoom .examTaker-nav-button-text-zoom .examTaker-nav-button-text-zoom-button._medium{font-size:12pt}.examTaker-header-region-right-inner .examTaker-nav-button._text_zoom .examTaker-nav-button-text-zoom .examTaker-nav-button-text-zoom-button{min-width:22px;max-width:22px;line-height:18pt;text-align:center;padding:0;margin:0;background-color:transparent;vertical-align:middle;border:2px solid;outline:0}.examTaker-header-region-right-inner .examTaker-nav-button._text_zoom .examTaker-nav-button-text-zoom .examTaker-nav-button-text-zoom-button._big{border-left-width:0;border-radius:0 6px 6px 0;font-size:15pt}.examTaker-main .examTaker-header{height:50px}.route-sessionsSessionBlockTake:not(._font-big):not(._font-medium) .examTaker-nav-button-text-zoom-button._small{border-top-left-radius:6px;border-bottom-left-radius:6px}.examTaker-header-region-right-inner .examTaker-nav-button-text-zoom button.examTaker-nav-button-text-zoom-button._big,.examTaker-header-region-right-inner .examTaker-nav-button-text-zoom button.examTaker-nav-button-text-zoom-button._medium,.examTaker-header-region-right-inner .examTaker-nav-button-text-zoom button.examTaker-nav-button-text-zoom-button._small{background-color:#00f;color:#fff}.examTaker-header-region-right-inner .examTaker-nav-button-text-zoom button.examTaker-nav-button-text-zoom-button._medium:hover{background-color:#fff!important;color:#000!important}body>.ember-view:not(.liquid-target-container){min-height:100vh;min-width:768px}button.image-engine-dialog-close{background-color:transparent;border:0;padding:0;border-radius:0;color:#3852a4;font-size:40px;font-weight:700}button.image-engine-dialog-close:focus,button.image-engine-dialog-close:hover{background-color:transparent;color:#3852a4}.notes-modal{position:absolute;top:46px;left:-4px;border:1px solid #97a5d0;background:#fff;z-index:100000}.examTaker-content .examTaker-notes{position:absolute;top:1px;right:1px}.examTaker-notes .examTaker-notes-title{margin-bottom:5px}.examTaker-notes-title{line-height:21px;position:relative;border-bottom:1px solid #000;background-color:var(--primary-color);color:#fff;text-align:center;font-size:13px}.examTaker-notes{padding:2px;width:356px;border:1px solid #000;background-color:#fff}.examTaker-notes-content{padding:3px}.examTaker-notes .examTaker-notes-input{margin-bottom:10px}.examTaker-notes-input{width:100%;height:100px;resize:none}.examTaker-notes-controls{display:flex}.examTaker-notes-control{line-height:12px;font-size:12px;white-space:nowrap;color:#000;border:2px outset #ece9d8;display:block;width:113px;height:32px;background-color:#ccc;margin-right:10px}.examTaker-notes-title .examTaker-notes-close{position:absolute;top:50%;transform:translate(0,-50%);right:3px}.notes-menu button{background-color:transparent;padding:0;color:#474747}.notes-menu button span{display:block;text-align:center;color:#474747;font-size:14px}.pt3{padding-top:3px}.notes-menu{position:relative;background:0 0}.clear,.save{background-color:var(--primary-color)!important;color:#fff!important}.clear:hover,.save:hover{background-color:var(--tertiary-color)!important;color:#000}"]
        })
    ], ItemNotesComponent);
    return ItemNotesComponent;
}());
export { ItemNotesComponent };
//# sourceMappingURL=data:application/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