/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/Accessor","../../core/promiseUtils","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","./ZoomConditions2D","./ZoomConditions3D"],(function(o,t,e,r,i,n,s,a,c,p,u){"use strict";let d=function(t){function e(o){var e;return(e=t.call(this,o)||this).canZoomIn=!1,e.canZoomOut=!1,e}o._inheritsLoose(e,t);var i=e.prototype;return i.destroy=function(){this.view=null},i.zoomIn=function(){if(!this.canZoomIn)return;const o=this.view;"2d"===o.type?o.mapViewNavigation.zoomIn():r.ignoreAbortErrors(o.goTo({zoomFactor:2}))},i.zoomOut=function(){if(!this.canZoomOut)return;const o=this.view;"2d"===o.type?o.mapViewNavigation.zoomOut():r.ignoreAbortErrors(o.goTo({zoomFactor:.5}))},o._createClass(e,[{key:"state",get:function(){return this.get("view.ready")?"ready":"disabled"}},{key:"view",set:function(o){o?"2d"===o.type?this._zoomConditions=new p({view:o}):"3d"===o.type&&(this._zoomConditions=new u({view:o})):this._zoomConditions=null,this._set("view",o)}}]),e}(e);t.__decorate([i.property()],d.prototype,"_zoomConditions",void 0),t.__decorate([i.property({aliasOf:"_zoomConditions.canZoomIn",readOnly:!0})],d.prototype,"canZoomIn",void 0),t.__decorate([i.property({aliasOf:"_zoomConditions.canZoomOut",readOnly:!0})],d.prototype,"canZoomOut",void 0),t.__decorate([i.property({readOnly:!0})],d.prototype,"state",null),t.__decorate([i.property()],d.prototype,"view",null),d=t.__decorate([c.subclass("esri.widgets.Zoom.ZoomViewModel")],d);return d}));
