import{r as t,c as e,h as i,H as s,g as a}from"./p-fa6b7678.js";const o=":host{display:none;position:absolute;top:0;left:0;width:100vw;height:100vh;justify-content:center;align-items:center;z-index:10005}:host .card{z-index:10005;opacity:0;position:relative;transition:all}:host(.no-overlay){position:relative;top:unset;left:unset;width:100%;height:auto}:host(.open) .card{opacity:1}:host(.elevated) .card{--card-border-width:0px}:host(.elevated) .card::part(card-container){box-shadow:0px 8px 16px 0px rgba(0, 0, 0, 0.12)}";const n=o;const h=class{constructor(i){t(this,i);this.cpslModalEntering=e(this,"cpslModalEntering",7);this.cpslModalEntered=e(this,"cpslModalEntered",7);this.cpslModalExiting=e(this,"cpslModalExiting",7);this.cpslModalExited=e(this,"cpslModalExited",7);this.enterTransitionDuration=.15;this.exitTransitionDuration=.15;this.elevated=undefined;this.noOverlay=undefined;this.open=undefined;this.zIndexOverride=undefined}toggleHeight(){if(!this.open){this.cpslModalExiting.emit();setTimeout((()=>{this.el.style.display="none";this.cpslModalExited.emit()}),this.exitTransitionDuration*1e3)}else{this.cpslModalEntering.emit();this.el.style.display="flex";setTimeout((()=>{this.cpslModalEntered.emit()}),this.enterTransitionDuration*1e3)}}componentDidLoad(){this.toggleHeight()}render(){return i(s,{key:"54037c194116e64864a47ea8eeedee31f804a736",class:{open:this.open,elevated:this.elevated,"no-overlay":this.noOverlay}},!this.noOverlay&&i("cpsl-overlay",{key:"152760c8eabdfca0dda636d7d28adc3030532558",zIndexOverride:this.zIndexOverride?this.zIndexOverride:undefined,id:"overlay",open:this.open,enterTransitionDuration:this.enterTransitionDuration,exitTransitionDuration:this.exitTransitionDuration}),i("cpsl-card",{key:"3e062561091c6831ece6a1abfd2b2e1dd67baefb",class:"card",style:{transitionDuration:this.open?`${this.exitTransitionDuration}s`:`${this.enterTransitionDuration}s`}},i("slot",{key:"94e26e323e40fd5bcc899d0311c044483442f5a4"})))}get el(){return a(this)}static get watchers(){return{open:["toggleHeight"]}}};h.style=n;export{h as cpsl_modal_v2};
//# sourceMappingURL=p-c9e61114.entry.js.map