(self.webpackJsonpworkbench=self.webpackJsonpworkbench||[]).push([[130],{580(t,o,e){e.d(o,{I:()=>r});var n=e(1998);class r{constructor(t){this.TYPE=n.I.INTERNAL_DROPDOWN_VALUE_SELECTED_EVENT,this.payload={value:t}}}},1998(t,o,e){e.d(o,{I:()=>r});var n,r=((n=r||{}).INTERNAL_DOWNLOAD_AS_EVENT="internalDownloadAsEvent",n.INTERNAL_DROPDOWN_VALUE_SELECTED_EVENT="internalDropdownValueSelectedEvent",n.INTERNAL_NOTIFICATION_MESSAGE_EVENT="internalNotificationMessageEvent",n.INTERNAL_SHOW_RESOURCE_COPY_LINK_DIALOG_EVENT="internalShowResourceCopyLinkDialogEvent",n.INTERNAL_SHOW_SAVED_QUERIES_EVENT="internalShowSavedQueriesEvent",n.INTERNAL_SHARE_QUERY_EVENT="internalShareQueryEvent",n.INTERNAL_EXPLAIN_QUERY_EVENT="internalExplainQueryEvent",n.INTERNAL_YASQE_DROPDOWN_ACTION_SELECTED_EVENT="internalYasqeDropdownActionSelected",n.INTERNAL_CREATE_SAVED_QUERY_EVENT="internalCreateSavedQueryEvent",n.INTERNAL_QUERY_EXECUTED="internalQueryExecuted",n.INTERNAL_QUERY_EVENT="internalQueryEvent",n.INTERNAL_COUNT_QUERY_EVENT="internalCountQueryEvent",n.INTERNAL_COUNT_QUERY_RESPONSE_EVENT="internalCountQueryResponseEvent",n.INTERNAL_REQUEST_ABORTED_EVENT="internalRequestAbortedEvent",n.INTERNAL_KEYBOARD_SHORTCUTS_CLICKED_EVENT="internalKeyboardShortcutsClickedEvent",n)},6130(t,o,e){e.r(o),e.d(o,{ontotext_dropdown:()=>i});var n=e(8644),r=e(580);e(1998);const i=(()=>{let t=class{constructor(t){(0,n.r)(this,t),this.valueChanged=(0,n.c)(this,"valueChanged",7),this.open=!1,this.showTooltip=!1,this.translationService=void 0,this.nameLabelKey=void 0,this.tooltipLabelKey=void 0,this.items=void 0,this.iconClass=""}keydownListener(t){"Escape"===t.key&&this.closeMenu()}mouseClickListener(t){t.target.closest(".ontotext-dropdown")||this.closeMenu()}render(){const t=this.tooltipLabelKey&&window.innerWidth<768,o=`ontotext-dropdown-button ${this.open?"ri-arrow-up-s-line-after":" ri-arrow-down-s-line-after"}\n    ${this.iconClass?`ontotext-dropdown-icon ${this.iconClass}`:""}`;return(0,n.h)("yasgui-tooltip",{"yasgui-data-tooltip":t?this.translate(this.nameLabelKey):""},(0,n.h)("div",{class:"ontotext-dropdown"},(0,n.h)("button",{class:o,onClick:()=>this.toggleComponent()},(0,n.h)("span",{class:"button-name"},this.translate(this.nameLabelKey))),(0,n.h)("div",{class:"ontotext-dropdown-menu "+(this.open?"open":"closed")},this.items&&this.items.map(t=>(0,n.h)("a",{href:"#",class:"ontotext-dropdown-menu-item",onClick:()=>this.onSelect(t.value)},this.translate(t.labelKey))))))}onSelect(t){this.open=!1,this.valueChanged.emit(new r.I(t))}toggleComponent(){this.open=!this.open}translate(t){return this.translationService?this.translationService.translate(t):""}closeMenu(){this.open=!1}};return t.style='.ontotext-dropdown{}.ontotext-dropdown .ontotext-dropdown-button{font-size:16px;font-weight:400;padding:5px 16px;line-height:1.25;border:none;outline:none;color:#FFFFFF;background-color:#e84e0f}.ontotext-dropdown .ontotext-dropdown-menu{position:absolute;margin:0;padding:0;z-index:1000}.ontotext-dropdown .ontotext-dropdown-menu-item{display:block;text-decoration:none;font-size:1rem;font-weight:400;padding:0.5em 1.2em;color:#FFFFFF;background-color:#e84e0f}.ontotext-dropdown .ontotext-dropdown-menu-item:hover{text-decoration:none;background-color:#d0460d;color:#ffffff}.ontotext-dropdown .ontotext-dropdown-icon:before{padding-right:5px}.ontotext-dropdown .ri-arrow-down-s-line-after:after{content:"\\ea4e"}.ontotext-dropdown .ri-arrow-up-s-line-after:after{content:"\\ea78"}.ontotext-dropdown .ontotext-dropdown-button.ri-arrow-down-s-line:after,.ontotext-dropdown .ontotext-dropdown-button.ri-arrow-up-s-line:after{padding-left:10px;color:#00000059}.ontotext-dropdown .ontotext-dropdown-menu.closed{display:none}.ontotext-dropdown .ontotext-dropdown-button:hover{cursor:pointer}@media (max-width: 768px){.ontotext-dropdown .ontotext-dropdown-button:after{padding-left:0 !important}.ontotext-dropdown .button-name{display:none}}',t})()}}]);