import{r as s,c as t,h as i}from"./p-386e91ad.js";const e=class{constructor(i){s(this,i),this.onPhoto=t(this,"onPhoto",7),this.noDeviceError=t(this,"noDeviceError",7),this.facingMode="user",this.hidePicker=!1}async present(){const s=document.createElement("pwa-camera-modal-instance");s.facingMode=this.facingMode,s.hidePicker=this.hidePicker,s.addEventListener("onPhoto",(async s=>{this._modal&&this.onPhoto.emit(s.detail)})),s.addEventListener("noDeviceError",(async s=>{this.noDeviceError.emit(s)})),document.body.append(s),this._modal=s}async dismiss(){this._modal&&(this._modal&&this._modal.parentNode.removeChild(this._modal),this._modal=null)}render(){return i("div",null)}};e.style=":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;display:-ms-flexbox;display:flex;contain:strict}.wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0, 0, 0, 0.15)}.content{-webkit-box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);box-shadow:0px 0px 5px rgba(0, 0, 0, 0.2);width:600px;height:600px}";export{e as pwa_camera_modal}