/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
import{b as r}from"./ODCCVHGI.js";import{H as n,h as t,i as s,r as a}from"./42WFQ3AX.js";import"./3QPJ2JCA.js";export default $arcgis.t(([c])=>{var l=t`/** @license
 * Copyright 2025 Esri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

:host {
  display: block;
}`,i=class extends n{constructor(){super(...arguments),this.visibilityIcon="eyeball",this.fullscreenStateChange=a()}static{this.properties={mapView:[0,{},{attribute:!1}],layerListWidget:[0,{},{attribute:!1}],visibilityIcon:1}}static{this.styles=l}willUpdate(e){e.has("mapView")&&this.mapViewWatchHandler(),e.has("visibilityIcon")&&this.visibilityIconWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this._initLayerListWidget()})}async visibilityIconWatchHandler(){this.layerListWidget&&(this.layerListWidget.visibilityAppearance=this.visibilityIcon==="checkbox"?"checkbox":"default")}render(){return s`<div class="layer-list-widget"></div>`}async updated(){this.hasUpdated||await this._initLayerListWidget()}async loaded(){await this._initLayerListWidget()}async _initLayerListWidget(){this.mapView&&(this.layerListWidget=new c({view:this.mapView,visibilityAppearance:this.visibilityIcon==="checkbox"?"checkbox":"default"}))}};r("layer-list-widget",i);return i},"widgets/LayerList")