/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{r as i,c as t,f as o,h as e,d as s,g as n}from"./p-C8IsBmNU.js";import{c as l}from"./p-COLHV2ym.js";const a="split-pane-main",r="split-pane-side",d={xs:"(min-width: 0px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",never:""},p=class{constructor(o){i(this,o),this.ionSplitPaneVisible=t(this,"ionSplitPaneVisible",7),this.visible=!1,this.disabled=!1,this.when=d.lg}visibleChanged(i){this.ionSplitPaneVisible.emit({visible:i})}async isVisible(){return Promise.resolve(this.visible)}async connectedCallback(){"undefined"!=typeof customElements&&null!=customElements&&await customElements.whenDefined("ion-split-pane"),this.styleMainElement(),this.updateState()}disconnectedCallback(){this.rmL&&(this.rmL(),this.rmL=void 0)}updateState(){if(this.rmL&&(this.rmL(),this.rmL=void 0),this.disabled)return void(this.visible=!1);const i=this.when;if("boolean"==typeof i)return void(this.visible=i);const t=d[i]||i;if(0===t.length)return void(this.visible=!1);const o=i=>{this.visible=i.matches},e=window.matchMedia(t);e.addListener(o),this.rmL=()=>e.removeListener(o),this.visible=e.matches}styleMainElement(){const i=this.contentId,t=this.el.children,e=this.el.childElementCount;let s=!1;for(let n=0;n<e;n++){const e=t[n],l=void 0!==i&&e.id===i;if(l){if(s)return void o("[ion-split-pane] - Cannot have more than one main node.");h(e,l),s=!0}}s||o("[ion-split-pane] - Does not have a specified main node.")}render(){const i=l(this);return e(s,{key:"96e6f7921d5e322f6d0e63d7a091c186672113fe",class:{[i]:!0,[`split-pane-${i}`]:!0,"split-pane-visible":this.visible}},e("slot",{key:"276c53411f85df47f8900d9641e49b7dde2a1d97"}))}get el(){return n(this)}static get watchers(){return{visible:["visibleChanged"],disabled:["updateState"],when:["updateState"]}}},h=(i,t)=>{let o,e;t?(o=a,e=r):(o=r,e=a);const s=i.classList;s.add(o),s.remove(e)};p.style={ionic:":host{--side-width:100%;right:0;left:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;contain:strict}:host(.split-pane-visible) ::slotted(.split-pane-main){right:0;left:0;top:0;bottom:0;position:relative;-ms-flex:1;flex:1;-webkit-box-shadow:none;box-shadow:none;overflow:hidden;z-index:0}::slotted(.split-pane-side:not(ion-menu)){display:none}:host{--border:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--side-min-width:270px;--side-max-width:28%}",ios:":host{--side-width:100%;right:0;left:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;contain:strict}:host(.split-pane-visible) ::slotted(.split-pane-main){right:0;left:0;top:0;bottom:0;position:relative;-ms-flex:1;flex:1;-webkit-box-shadow:none;box-shadow:none;overflow:hidden;z-index:0}::slotted(.split-pane-side:not(ion-menu)){display:none}:host{--border:0.55px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));--side-min-width:270px;--side-max-width:28%}",md:":host{--side-width:100%;right:0;left:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;contain:strict}:host(.split-pane-visible) ::slotted(.split-pane-main){right:0;left:0;top:0;bottom:0;position:relative;-ms-flex:1;flex:1;-webkit-box-shadow:none;box-shadow:none;overflow:hidden;z-index:0}::slotted(.split-pane-side:not(ion-menu)){display:none}:host{--border:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--side-min-width:270px;--side-max-width:28%}"};export{p as ion_split_pane}