import{_ as e}from"./tslib.es6-d65164b3.js";import{D as t}from"./devextreme-widget-wrapper-9c026d7d.js";import{C as s}from"./custom-events-helper-e7f279d3.js";import{C as r}from"./events-a8fe5872.js";import{c as n}from"./create-after-timeout-fn-executor-38b3d79d.js";import{C as o}from"./client-component-style-helper-195fa7c3.js";import{e as i}from"./custom-element-267f9a21.js";import"./dom-utils-bf33c859.js";import"./dom-4684d8d6.js";import"./_commonjsHelpers-41cdd1e7.js";import"./string-2448bf95.js";import"./browser-3fc721b7.js";import"./css-classes-1103f305.js";import"./utils-b5b2c8a9.js";import"./single-slot-element-base-bbf951b4.js";import"./data-qa-utils-8be7c726.js";import"./const-90026e45.js";import"./dx-ui-element-b777832b.js";import"./lit-element-base-b20b52b2.js";import"./dx-license-e00a5bc7.js";import"./lit-element-462e7ad3.js";import"./logicaltreehelper-67db40f1.js";import"./layouthelper-67dd777a.js";import"./point-e4ec110e.js";import"./constants-7c047c0d.js";import"./property-4ec0b52d.js";const a="dxbl-gauge-base";class p extends r{constructor(){super(p.eventName)}}p.eventName=a+".drawn";class d extends r{constructor(){super(d.eventName)}}d.eventName=a+".exported",s.register(p.eventName,(e=>e.detail)),s.register(d.eventName,(e=>e.detail));class c extends t{constructor(){super(),this._styleHelper=o.getInstance(),this._drawnExecutor=n(this.onGaugeDrawn.bind(this))}createWidgetDefaultOptions(){return{palette:this._styleHelper.palette}}createWidgetHandlers(){return{...super.createWidgetHandlers(),onDrawn:()=>this.onGaugeDrawn(),onOptionChanged:()=>this.onGaugeOptionChanged(),onExported:()=>this.onGaugeExported()}}onGaugeDrawn(){this._drawnExecutor.reset(),this.changeLoadingPanelVisibility(!1),this.dispatchEvent(new p)}onGaugeOptionChanged(){this._drawnExecutor.execute()}onGaugeExported(){this.dispatchEvent(new d)}onlyContainerSizeChanged(){this.onGaugeDrawn()}exportTo(...e){return this.executeClientMethod("exportTo",...e)}print(...e){return this.executeClientMethod("print",...e)}svg(...e){return this.executeClientMethod("svg",...e)}}const l="dxbl-bar-gauge",m="legend",u="itemCaptions",g="color",h="font",$="subtitle",b="title",x=`${h}.${g}`,j=`${m}.${x}`,f=`${b}.${x}`,v=`${b}.${$}.${x}`,w=`${m}.${f}`,C=`${m}.${v}`,D=`--${l}`,G=`${D}-${m}`,y=`${h}-${g}`,E=`${b}-${y}`,O=`${$}-${y}`;let N=class extends c{getWidgetTypeName(){return"dxBarGauge"}processSpecialOptions(e){super.processSpecialOptions(e),this.prepareLegend(e[m])}prepareLegend(e){const t=null==e?void 0:e[u];t&&(e.customizeText=e=>{var s,r;const n=null===(s=e.item)||void 0===s?void 0:s.index;return null!==(r=t[n])&&void 0!==r?r:e.text},delete e[u])}getThemeDependentOptionsDict(){const e={[f]:`${D}-${E}`,[v]:`${D}-${O}`,[j]:`${G}-item-${y}`,[w]:`${G}-${E}`,[C]:`${G}-${O}`};return{...super.getThemeDependentOptionsDict(),...e}}};N=e([i(l)],N);export{N as DxBarGauge};
