/*
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/accessorSupport/decorators/aliasOf","../core/arrayUtils","../core/has","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/property","../core/accessorSupport/decorators/subclass","./Widget","./NavigationToggle/NavigationToggleViewModel","./support/decorators/accessibleHandler","./support/decorators/messageBundle","./support/jsxFactory","./support/widgetUtils"],(function(t,e,o,s,i,a,r,n,l,c,g,p,d,u){"use strict";const v={base:"esri-navigation-toggle esri-widget",button:"esri-navigation-toggle__button esri-widget--button",activeButton:"esri-navigation-toggle__button--active",panButton:"esri-navigation-toggle__button--pan",rotateButton:"esri-navigation-toggle__button--rotate",isLayoutHorizontal:"esri-navigation-toggle--horizontal",rotationIcon:"esri-icon-rotate",panIcon:"esri-icon-pan",widgetIcon:"esri-icon-pan2",disabled:"esri-disabled"};let _=function(e){function o(t,o){var s;return(s=e.call(this,t,o)||this).iconClass=v.widgetIcon,s.label=void 0,s.messages=null,s.view=null,s.viewModel=new c,s}t._inheritsLoose(o,e);var s=o.prototype;return s.toggle=function(){return this.viewModel.toggle()},s.render=function(){const t="disabled"===this.get("viewModel.state"),e="pan"===this.get("viewModel.navigationMode"),o={[v.disabled]:t,[v.isLayoutHorizontal]:"horizontal"===this.layout},s={[v.activeButton]:e},i={[v.activeButton]:!e},a=t?-1:0,r=this.messages.toggle;return d.tsx("div",{bind:this,class:this.classes(v.base,o),onclick:this._toggle,onkeydown:this._toggle,tabIndex:a,"aria-label":r,title:r},d.tsx("div",{class:this.classes(v.button,v.panButton,s)},d.tsx("span",{class:v.panIcon})),d.tsx("div",{class:this.classes(v.button,v.rotateButton,i)},d.tsx("span",{class:v.rotationIcon})))},s._toggle=function(){this.toggle()},t._createClass(o,[{key:"layout",set:function(t){"horizontal"!==t&&(t="vertical"),this._set("layout",t)}}]),o}(l);e.__decorate([r.property()],_.prototype,"iconClass",void 0),e.__decorate([r.property({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],_.prototype,"label",void 0),e.__decorate([r.property({value:"vertical"})],_.prototype,"layout",null),e.__decorate([r.property(),p.messageBundle("esri/widgets/NavigationToggle/t9n/NavigationToggle")],_.prototype,"messages",void 0),e.__decorate([o.aliasOf("viewModel.view")],_.prototype,"view",void 0),e.__decorate([r.property({type:c})],_.prototype,"viewModel",void 0),e.__decorate([g.accessibleHandler()],_.prototype,"_toggle",null),_=e.__decorate([n.subclass("esri.widgets.NavigationToggle")],_);return _}));
