/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as o}from"tslib";import{property as t,subclass as e}from"../core/accessorSupport/decorators.js";import s from"./Widget.js";import{loadCalciteComponents as i}from"./support/componentsUtils.js";import{globalCss as l}from"./support/globalCss.js";import{messageBundle as r,tsx as n}from"./support/widget.js";import a from"./Zoom/ZoomViewModel.js";const m={base:"esri-zoom",horizontalLayout:"esri-zoom--horizontal"};let c=class extends s{constructor(o,t){super(o,t),this.messages=null,this.viewModel=new a({suppressDeprecationWarning:!0}),this.zoomIn=()=>this.viewModel.zoomIn(),this.zoomOut=()=>this.viewModel.zoomOut()}loadDependencies(){return i({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get icon(){return"magnifying-glass-plus"}set icon(o){this._overrideIfSome("icon",o)}get label(){return this.messages?.widgetLabel??""}set label(o){this._overrideIfSome("label",o)}set layout(o){"horizontal"!==o&&(o="vertical"),this._set("layout",o)}set view(o){this.viewModel.view=o}get view(){return this.viewModel.view}render(){const o={[m.horizontalLayout]:"horizontal"===this.layout},{canZoomIn:t,canZoomOut:e}=this.viewModel,{zoomIn:s,zoomOut:i}=this.messages;return n("div",{class:this.classes(m.base,l.widget,o)},n("calcite-button",{class:l.widgetButton,disabled:!t,iconStart:"plus",kind:"neutral",label:s,title:s,onclick:this.zoomIn}),n("calcite-button",{class:l.widgetButton,disabled:!e,iconStart:"minus",kind:"neutral",label:i,title:i,onclick:this.zoomOut}))}};o([t()],c.prototype,"icon",null),o([t()],c.prototype,"label",null),o([t({value:"vertical"})],c.prototype,"layout",null),o([t(),r("esri/widgets/Zoom/t9n/Zoom")],c.prototype,"messages",void 0),o([t()],c.prototype,"view",null),o([t({type:a})],c.prototype,"viewModel",void 0),c=o([e("esri.widgets.Zoom")],c);const u=c;export{u as default};
