(window.webpackJsonp=window.webpackJsonp||[]).push([[305],{337:function(t,o,e){"use strict";e.r(o),e.d(o,"keyboard_shortcuts_dialog",(function(){return i}));var r=e(29);const i=class{constructor(t){Object(r.g)(this,t),this.open=void 0,this.items=[],this.translationService=void 0}keydownListener(t){"Escape"===t.key&&(this.open=!1)}openDialog(){this.open=!0}closeDialog(t){const o=t.target;t.stopPropagation(),(o.classList.contains("close-button")||o.classList.contains("dialog-overlay"))&&(this.open=!1)}buildDialogConfig(){return{dialogTitle:this.translationService.translate("yasqe.keyboard_shortcuts.dialog.title"),onClose:this.closeDialog.bind(this)}}translateLabel(t){return this.translate(`yasqe.keyboard_shortcuts.dialog.item.${t}.label`)}translateDescription(t){return this.translate(`yasqe.keyboard_shortcuts.dialog.item.${t}.description`)}translate(t){return this.translationService?this.translationService.translate(t):t}render(){return Object(r.e)(r.a,{class:"keyboard-shortcuts-dialog-wrapper"},this.open&&Object(r.e)("ontotext-dialog-web-component",{config:this.buildDialogConfig()},Object(r.e)("div",{slot:"body"},this.items.map(t=>Object(r.e)("div",{class:"keyboard-shortcut-description-item"},Object(r.e)("kbd",{class:"keyboard-shortcut-description-item-label"},Object(r.e)("span",null,this.translateLabel(t))),Object(r.e)("div",{class:"keyboard-shortcut-description-item-description"},this.translateDescription(t)))))),!this.open&&Object(r.e)("button",{class:"keyboard-shortcuts-dialog-button",onClick:()=>this.openDialog()},this.translate("yasqe.keyboard_shortcuts.btn.label")))}};i.style=".keyboard-shortcuts-dialog-wrapper{display:flex;justify-content:flex-end;margin-top:-9px;margin-right:1px;z-index:1015}.keyboard-shortcuts-dialog-wrapper .keyboard-shortcuts-dialog-button{background-color:#f7f7f7;outline:none;border:0.5px solid #EBEBEB;cursor:pointer;position:relative;z-index:1015}.keyboard-shortcuts-dialog-wrapper .dialog{min-width:80vw}.keyboard-shortcuts-dialog-wrapper .dialog .dialog-footer{display:none}.keyboard-shortcuts-dialog-wrapper .keyboard-shortcut-description-item{display:flex;flex-direction:row;gap:10px;padding-bottom:10px}.keyboard-shortcuts-dialog-wrapper .keyboard-shortcut-description-item-label{width:50%;text-align:end;font-size:14px}.keyboard-shortcuts-dialog-wrapper .keyboard-shortcut-description-item-label span{color:#fff;background-color:#333;border-radius:0.2rem;padding:4px}.keyboard-shortcuts-dialog-wrapper .keyboard-shortcut-description-item-description{width:50%;font-size:20px}.keyboard-shortcuts-dialog-wrapper kbd{background-color:#FFF}.keyboard-shortcuts-dialog-wrapper.resizeable-on{margin-top:-29px}.yasqe-fullscreen .keyboard-shortcuts-dialog-wrapper .keyboard-shortcuts-dialog-button{position:fixed;bottom:0;right:0}"}}]);