/**
 * Copyright 2018 The Pennsylvania State University
 * @license Apache-2.0, see License.md for full text.
 */
import{LitElement as e,html as l,css as n}from"../../lit/index.js";const FullscreenBehaviors=function(e){return class extends e{static get properties(){return{fullscreen:{type:Boolean,attribute:"fullscreen",reflect:!0},fullscreenEnabled:{type:Boolean,attribute:"fullscreen-enabled",reflect:!0}}}render(){return l` <slot></slot> `}constructor(){super(),this.fullscreen=!1,this.fullscreenEnabled=globalThis.document.fullscreenEnabled,globalThis.document.onfullscreenchange=this._handleFullscreenChange.bind(this),this.onfullscreenchange=this._handleFullscreenChange}disconnectedCallback(){super.disconnectedCallback()}static get tag(){return"fullscreen-behaviors"}get fullscreenTarget(){return this}_handleFullscreenChange(e){this.fullscreen=globalThis.document.fullscreenElement===this.fullscreenTarget}toggleFullscreen(e=globalThis.document.fullscreenElement!==this.fullscreenTarget){(!e||document.fullscreenElement&&globalThis.document.exitFullscreen)&&globalThis.document.exitFullscreen(),e&&this.fullscreenTarget.requestFullscreen()}}};class FullscreenBehaviorsEl extends(FullscreenBehaviors(e)){}customElements.define(FullscreenBehaviorsEl.tag,FullscreenBehaviorsEl);export{FullscreenBehaviorsEl,FullscreenBehaviors};