import{proxyCustomElement,HTMLElement,createEvent,h}from"@stencil/core/internal/client";const ScProvider$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.mountEmitter=createEvent(this,"mountConsumer",7),this.STENCIL_CONTEXT=void 0,this.consumers=[]}watchContext(e){this.consumers.forEach((t=>t(e)))}async mountConsumer(e){e.stopPropagation(),this.consumers=this.consumers.slice().concat([e.detail]),await e.detail(this.STENCIL_CONTEXT);const t=this.consumers.indexOf(e.detail),s=this.consumers.slice(0,t).concat(this.consumers.slice(t+1,this.consumers.length));this.consumers=s}disconnectedCallback(){this.consumers.map((e=>this.mountEmitter.emit(e)))}render(){return h("slot",{key:"955b9395739aec78543c20c13e993b6dad2735b6"})}static get watchers(){return{STENCIL_CONTEXT:["watchContext"]}}},[4,"sc-provider",{STENCIL_CONTEXT:[16],consumers:[32]},[[0,"mountConsumer","mountConsumer"]],{STENCIL_CONTEXT:["watchContext"]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["sc-provider"].forEach((e=>{"sc-provider"===e&&(customElements.get(e)||customElements.define(e,ScProvider$1))}))}const ScProvider=ScProvider$1,defineCustomElement=defineCustomElement$1;export{ScProvider,defineCustomElement};