import { LitElement, html, css } from 'lit';
class FullScreenToggle extends LitElement {
    static { this.styles = [
        css `
      :host {
        md-icon {
          cursor: pointer;
          display: flex;
        }

        /* Mobile Styles */
        @media (max-width: 768px) {
          md-icon {
            display: none;
          }
        }
      }
    `
    ]; }
    constructor() {
        super();
        this.isFullScreen = false;
        this.isFullScreen = false;
    }
    connectedCallback() {
        super.connectedCallback();
        this._boundFullScreenChange = this._onFullScreenChange.bind(this);
        document.addEventListener('fullscreenchange', this._boundFullScreenChange);
    }
    disconnectedCallback() {
        document.removeEventListener('fullscreenchange', this._boundFullScreenChange);
        super.disconnectedCallback();
    }
    _onFullScreenChange() {
        this.isFullScreen = !!document.fullscreenElement;
        this.requestUpdate();
    }
    toggleFullScreen() {
        if (!document.fullscreenElement) {
            document.documentElement.requestFullscreen().catch(err => {
                console.error(`전체화면 활성화 실패: ${err.message} (${err.name})`);
            });
        }
        else {
            document.exitFullscreen().catch(err => {
                console.error(`전체화면 종료 실패: ${err.message} (${err.name})`);
            });
        }
    }
    render() {
        return html `
      <md-icon @click=${this.toggleFullScreen}> ${this.isFullScreen ? 'zoom_in_map' : 'zoom_out_map'} </md-icon>
    `;
    }
}
customElements.define('full-screen-toggle', FullScreenToggle);
//# sourceMappingURL=full-screen-toggle.js.map