/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as o}from"tslib";import{property as t,subclass as e}from"../../../core/accessorSupport/decorators.js";import{get as n}from"../../../core/accessorSupport/get.js";import i from"../../Widget.js";import{loadCalciteComponents as c}from"../../support/componentsUtils.js";import{tsx as s}from"../../support/widget.js";const r={point:()=>[p("pin","point","draw.point"),p("line","polyline","draw.polyline"),p("polygon","polygon","draw.polygon")],polyline:()=>[p("line","polyline","draw.polyline")],polygon:()=>[p("polygon","polygon","draw.polygon")]};let a=class extends i{constructor(o){super(o),this.messages=null,this.type=null}loadDependencies(){return c({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}static{this.vnodeSelector="calcite-action-bar"}render(){const{messages:o,type:t}=this,e=l(t);return s("calcite-action-bar",{expandDisabled:!0,floating:!0,layout:"horizontal",position:"start"},e.map(({icon:t,messageKey:e,action:i})=>{const c=n(o,e);return s("calcite-action-group",null,s("calcite-action",{alignment:"center",bind:this,"data-action":i,icon:t,onclick:this.onAction,text:c,title:c}))}))}};function p(o,t,e){return{icon:o,messageKey:e,action:`draw-${t}`}}function l(o){return[{icon:"cursor",messageKey:"selectFeature",action:"select-feature"},...r[o]?.()??[],{icon:"save",messageKey:"save",action:"save"},{icon:"trash",messageKey:"delete",action:"delete-feature"}]}o([t()],a.prototype,"messages",void 0),o([t()],a.prototype,"onAction",void 0),o([t()],a.prototype,"type",void 0),a=o([e("esri.widgets.OrientedImageryViewer.components.SketchTools")],a);const m=a;export{m as default};
