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-icon2.js";import{d as defineCustomElement$1}from"./sc-order-manual-instructions2.js";const ScOrderConfirmComponentsValidator=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.checkout=void 0,this.hasManualInstructions=void 0}handleOrderChange(){var e;(null===(e=this.checkout)||void 0===e?void 0:e.manual_payment)&&this.addManualPaymentInstructions()}addManualPaymentInstructions(){var e,t;if(this.hasManualInstructions)return;const n=this.el.shadowRoot.querySelector("slot").assignedElements({flatten:!0}).find((e=>"SC-ORDER-CONFIRMATION-DETAILS"===e.tagName)),s=document.createElement("sc-order-manual-instructions");null===(t=null===(e=null==n?void 0:n.parentNode)||void 0===e?void 0:e.insertBefore)||void 0===t||t.call(e,s,n),this.hasManualInstructions=!0}componentWillLoad(){this.hasManualInstructions=!!this.el.querySelector("sc-order-manual-instructions")}render(){return h("slot",{key:"dc86b9dc0945488adaca74b65a593b91712f594a"})}get el(){return this}static get watchers(){return{checkout:["handleOrderChange"]}}},[1,"sc-order-confirm-components-validator",{checkout:[16],hasManualInstructions:[32]},void 0,{checkout:["handleOrderChange"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["sc-order-confirm-components-validator","sc-alert","sc-icon","sc-order-manual-instructions"].forEach((e=>{switch(e){case"sc-order-confirm-components-validator":customElements.get(e)||customElements.define(e,ScOrderConfirmComponentsValidator);break;case"sc-alert":customElements.get(e)||defineCustomElement$3();break;case"sc-icon":customElements.get(e)||defineCustomElement$2();break;case"sc-order-manual-instructions":customElements.get(e)||defineCustomElement$1()}}))}export{ScOrderConfirmComponentsValidator as S,defineCustomElement as d};