import{h}from"@stencil/core";export class ScOrderConfirmComponentsValidator{constructor(){this.checkout=void 0,this.hasManualInstructions=void 0}handleOrderChange(){var t;(null===(t=this.checkout)||void 0===t?void 0:t.manual_payment)&&this.addManualPaymentInstructions()}addManualPaymentInstructions(){var t,e;if(this.hasManualInstructions)return;const n=this.el.shadowRoot.querySelector("slot").assignedElements({flatten:!0}).find((t=>"SC-ORDER-CONFIRMATION-DETAILS"===t.tagName)),o=document.createElement("sc-order-manual-instructions");null===(e=null===(t=null==n?void 0:n.parentNode)||void 0===t?void 0:t.insertBefore)||void 0===e||e.call(t,o,n),this.hasManualInstructions=!0}componentWillLoad(){this.hasManualInstructions=!!this.el.querySelector("sc-order-manual-instructions")}render(){return h("slot",{key:"18b78dc40ddf86f5148f4b52378e79d881dcf65a"})}static get is(){return"sc-order-confirm-components-validator"}static get encapsulation(){return"shadow"}static get properties(){return{checkout:{type:"unknown",mutable:!1,complexType:{original:"Checkout",resolved:"Checkout",references:{Checkout:{location:"import",path:"../../../types",id:"src/types.ts::Checkout"}}},required:!1,optional:!1,docs:{tags:[],text:"The checkout"}}}}static get states(){return{hasManualInstructions:{}}}static get elementRef(){return"el"}static get watchers(){return[{propName:"checkout",methodName:"handleOrderChange"}]}}