/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
import { c as s } from "../../chunks/runtime.js";
import { css as t, html as r } from "lit";
import { createRef as l, ref as i } from "lit-html/directives/ref.js";
import { LitElement as c, createEvent as a } from "@arcgis/lumina";
import * as n from "@arcgis/core/core/reactiveUtils.js";
const f = t`:host{display:block}`;
class m extends c {
  constructor() {
    super(...arguments), this.fullscreenRef = l(), this.fullscreenStateChange = a(), this._fullscreenReady = () => {
      n.watch(() => this.fullscreenRef.value?.state, (e) => e && this.fullscreenStateChange.emit(e));
    };
  }
  static {
    this.properties = { mapView: 0, fullscreenRef: 0 };
  }
  static {
    this.styles = f;
  }
  render() {
    return this.mapView && r`<arcgis-fullscreen visual-scale=m .view=${this.mapView} @arcgisReady=${this._fullscreenReady} ${i(this.fullscreenRef)}></arcgis-fullscreen>` || "";
  }
}
s("map-fullscreen", m);
export {
  m as MapFullscreen
};
