import{h}from"@stencil/core";export class ScFormErrorProvider{componentWillLoad(){this.maybeAddErrorsComponent()}maybeAddErrorsComponent(){var r,e;if(this.el.querySelector("sc-checkout-form-errors"))return;const o=document.createElement("sc-checkout-form-errors");null===(e=null===(r=this.el.querySelector("sc-form"))||void 0===r?void 0:r.prepend)||void 0===e||e.call(r,o)}render(){return h("slot",{key:"6651af051808f65a7a34693d89afdfd9e8a99c1c"})}static get is(){return"sc-form-error-provider"}static get encapsulation(){return"shadow"}static get elementRef(){return"el"}}