import{DialogComponent}from"@theme/dialog";import{CartAddEvent}from"@theme/events";class CartDrawerComponent extends DialogComponent{connectedCallback(){super.connectedCallback(),document.addEventListener(CartAddEvent.eventName,this.#handleCartAdd)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(CartAddEvent.eventName,this.#handleCartAdd)}#handleCartAdd=()=>{this.hasAttribute("auto-open")&&this.showDialog()};open(){this.showDialog(),customElements.whenDefined("shopify-payment-terms").then(()=>{document.querySelector("shopify-payment-terms")?.shadowRoot?.querySelector("#shopify-installments-cta")?.addEventListener("click",this.closeDialog,{once:!0})})}close(){this.closeDialog()}}customElements.get("cart-drawer-component")||customElements.define("cart-drawer-component",CartDrawerComponent);
//# sourceMappingURL=/s/files/1/0677/1399/0759/t/1/assets/cart-drawer.js.map?v=1783128457
