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{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";import"./events-a8fe5872.js";const r="dxbl-map";class o extends CustomEvent{constructor(e,t){super(o.eventName,{detail:new n(e,t),bubbles:!0,composed:!0,cancelable:!0})}}o.eventName=r+".click";class a extends CustomEvent{constructor(e){super(a.eventName,{detail:new l(e),bubbles:!0,composed:!0,cancelable:!0})}}a.eventName=r+".marker-click";class n{constructor(e,t){this.Latitude=e,this.Longitude=t}}class l{constructor(e){this.Key=e}}var c,p;s.register(o.eventName,(e=>e.detail)),s.register(a.eventName,(e=>e.detail)),null!==(c=(p=window).sj_evt)&&void 0!==c||(p.sj_evt={fire:()=>{},bind:()=>{}});const d="markerId";let m=class extends t{createWidgetHandlers(){return{...super.createWidgetHandlers(),onClick:e=>this.onMapClick(e),onReady:e=>this.onMapReady(e),onOptionChanged:e=>this.onMapOptionChanged(e)}}getWidgetModuleName(){return"ui"}getWidgetTypeName(){return"dxMap"}disposeWidget(e){var t;null===(t=null==e?void 0:e._lastAsyncAction)||void 0===t||t.catch((e=>{})),super.disposeWidget(e)}createWidgetDefaultOptions(){return{height:"100%",width:"100%"}}processSpecialOptions(e){super.processSpecialOptions(e),this.preapreMarkerClickHandlers(e.markers)}onMapClick(e){this.dispatchEvent(new o(e.location.lat,e.location.lng))}onMapReady(e){this.changeLoadingPanelVisibility(!1)}onMapOptionChanged(e){this.changeLoadingPanelVisibility(!1)}preapreMarkerClickHandlers(e){null==e||e.forEach((e=>{if(e[d]){const t=e[d];e.onClick=()=>{this.onMarkerClick(t)},delete e[d]}}))}onMarkerClick(e){this.dispatchEvent(new a(e))}};m=e([i("dxbl-map")],m);export{m as DxMap};
