/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
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 l from"./Widget.js";import r from"./Fullscreen/FullscreenViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{messageBundle as d,tsx as p}from"./support/widget.js";const u={base:"esri-fullscreen"};let a=class extends l{constructor(e,o){super(e,o),this.messages=null,this.viewModel=new r({isDefaultViewModel:!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 p("div",{class:this.classes(u.base,c.widget)},!o&&p("calcite-button",{class:c.widgetButton,disabled:"disabled"===s,iconStart:t,kind:"neutral",label:e,onclick:this._toggle,title:e}))}};e([o()],a.prototype,"element",null),e([o({readOnly:!0})],a.prototype,"fullscreenTitle",null),e([o()],a.prototype,"icon",null),e([o()],a.prototype,"label",null),e([o(),d("esri/widgets/Fullscreen/t9n/Fullscreen")],a.prototype,"messages",void 0),e([o()],a.prototype,"view",null),e([o({type:r})],a.prototype,"viewModel",void 0),a=e([i("esri.widgets.Fullscreen")],a);const m=a;export{m as default};
