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)),a=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,a,n),this.hasManualInstructions=!0}componentWillLoad(){this.hasManualInstructions=!!this.el.querySelector("sc-order-manual-instructions")}render(){return h("slot",{key:"7e2dfbd843bf6a068d9f7c7f6aa06c31a91508a3"})}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"}]}}