UNPKG

graphdb-workbench

Version:
1 lines 818 B
import{r as registerInstance,h,a as Host}from"./index-I_gcXFWK.js";import{T as TranslationService}from"./translation.service-nljGIprK.js";import"@ontotext/workbench-api";const translateLabelCss=":host{display:inline}",TranslateLabel=class{constructor(a){registerInstance(this,a),this.unsubscribeTranslationChanged=null,this.translationParameters=[]}connectedCallback(){this.unsubscribeTranslationChanged=TranslationService.onTranslate(this.labelKey,this.translationParameters,a=>this.translatedLabel=a)}disconnectedCallback(){this.unsubscribeTranslationChanged&&(this.unsubscribeTranslationChanged(),this.unsubscribeTranslationChanged=null)}render(){return h(Host,{key:"8ea0a74f6d14dcceeb6dff30dc86acd728603e05"},this.translatedLabel)}};TranslateLabel.style=translateLabelCss;export{TranslateLabel as translate_label};