/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{property as o,subclass as i}from"../core/accessorSupport/decorators.js";import r from"./Widget.js";import l from"./Fullscreen/FullscreenViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{messageBundle as p,tsx as d}from"./support/widget.js";const a={base:"esri-fullscreen"};let u=class extends r{constructor(e,o){super(e,o),this.messages=null,this.viewModel=new l({suppressDeprecationWarning:!0}),this._toggle=()=>{this.viewModel.toggle()},t(s.getLogger(this),"Fullscreen","arcgis-fullscreen",{version:"4.32"})}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get element(){return this.viewModel.element}set element(e){this.viewModel.element=e}get fullscreenTitle(){const e=this.viewModel?.state;return"active"===e?this.messages.exit:"ready"===e?this.messages.enter:""}get icon(){const e=this.viewModel?.state;return"ready"===e||"disabled"===e||"feature-unsupported"===e?"zoom-out-fixed":"zoom-in-fixed"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{fullscreenTitle:e,icon:t}=this,s=this.viewModel?.state,o="feature-unsupported"===s;return d("div",{class:this.classes(a.base,c.widget)},!o&&d("calcite-button",{class:c.widgetButton,disabled:"disabled"===s,iconStart:t,kind:"neutral",label:e,onclick:this._toggle,title:e}))}};e([o()],u.prototype,"element",null),e([o({readOnly:!0})],u.prototype,"fullscreenTitle",null),e([o()],u.prototype,"icon",null),e([o()],u.prototype,"label",null),e([o(),p("esri/widgets/Fullscreen/t9n/Fullscreen")],u.prototype,"messages",void 0),e([o()],u.prototype,"view",null),e([o({type:l})],u.prototype,"viewModel",void 0),u=e([i("esri.widgets.Fullscreen")],u);const m=u;export{m as default};
