/*
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","./Fullscreen/FullscreenViewModel","./support/decorators/accessibleHandler","./support/decorators/messageBundle","./support/jsxFactory","./support/widgetUtils"],(function(e,t,s,r,o,i,l,n,a,c,d,u,p,v){"use strict";const g={base:"esri-fullscreen esri-widget--button esri-widget",text:"esri-icon-font-fallback-text",icon:"esri-icon",enter:"esri-icon-zoom-out-fixed",exit:"esri-icon-zoom-in-fixed",disabled:"esri-disabled"};let f=function(t){function s(e,s){var r;return(r=t.call(this,e,s)||this).element=null,r.label=void 0,r.messages=null,r.view=null,r.viewModel=new c,r}e._inheritsLoose(s,t);var r=s.prototype;return r.render=function(){var e;const t=null==(e=this.viewModel)?void 0:e.state,{fullscreenTitle:s}=this,r={[g.disabled]:"disabled"===t||"feature-unsupported"===t};return p.tsx("div",{bind:this,class:this.classes(g.base,r),role:"button",tabIndex:0,onclick:this._toggle,onkeydown:this._toggle,"aria-label":s,title:s},this.renderIcon(),this.renderTitle())},r.renderIcon=function(){var e;const t=null==(e=this.viewModel)?void 0:e.state,s={[g.enter]:"ready"===t||"disabled"===t||"feature-unsupported"===t,[g.exit]:"active"===t};return p.tsx("span",{class:this.classes(g.icon,s),"aria-hidden":"true"})},r.renderTitle=function(){return p.tsx("span",{class:g.text},this.fullscreenTitle)},r._toggle=function(){this.viewModel.toggle()},e._createClass(s,[{key:"fullscreenTitle",get:function(){var e;const t=null==(e=this.viewModel)?void 0:e.state;return"active"===t?this.messages.exit:"ready"===t?this.messages.enter:""}}]),s}(a);t.__decorate([s.aliasOf("viewModel.element")],f.prototype,"element",void 0),t.__decorate([l.property({readOnly:!0})],f.prototype,"fullscreenTitle",null),t.__decorate([l.property({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],f.prototype,"label",void 0),t.__decorate([l.property(),u.messageBundle("esri/widgets/Fullscreen/t9n/Fullscreen")],f.prototype,"messages",void 0),t.__decorate([s.aliasOf("viewModel.view")],f.prototype,"view",void 0),t.__decorate([l.property({type:c})],f.prototype,"viewModel",void 0),t.__decorate([d.accessibleHandler()],f.prototype,"_toggle",null),f=t.__decorate([n.subclass("esri.widgets.Fullscreen")],f);return f}));
