import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{d as defineCustomElement$3}from"./sc-alert2.js";import{d as defineCustomElement$2}from"./sc-checkout-form-errors2.js";import{d as defineCustomElement$1}from"./sc-icon2.js";const ScFormErrorProvider=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow()}componentWillLoad(){this.maybeAddErrorsComponent()}maybeAddErrorsComponent(){var e,r;if(this.el.querySelector("sc-checkout-form-errors"))return;const o=document.createElement("sc-checkout-form-errors");null===(r=null===(e=this.el.querySelector("sc-form"))||void 0===e?void 0:e.prepend)||void 0===r||r.call(e,o)}render(){return h("slot",{key:"34c29b55dc72b6c4d524eab8b4cd15bc85799f9e"})}get el(){return this}},[1,"sc-form-error-provider"]);function defineCustomElement(){"undefined"!=typeof customElements&&["sc-form-error-provider","sc-alert","sc-checkout-form-errors","sc-icon"].forEach((e=>{switch(e){case"sc-form-error-provider":customElements.get(e)||customElements.define(e,ScFormErrorProvider);break;case"sc-alert":customElements.get(e)||defineCustomElement$3();break;case"sc-checkout-form-errors":customElements.get(e)||defineCustomElement$2();break;case"sc-icon":customElements.get(e)||defineCustomElement$1()}}))}export{ScFormErrorProvider as S,defineCustomElement as d};