import{r as e,c as t,h as s}from"./p-e97fde0a.js";import{s as a}from"./p-53e7f7d7.js";import"./p-03631502.js";import"./p-9dbc54d6.js";import"./p-d3366af3.js";import"./p-401e165e.js";import"./p-830ab1a3.js";import"./p-ec182234.js";import"./p-3f6362a4.js";import"./p-95325ec5.js";import"./p-4df6e0c5.js";const i=".cart-header{display:flex;align-items:center;justify-content:space-between;width:100%;font-size:1em}.cart-title{text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 var(--sc-spacing-small)}.cart__close{cursor:pointer}";const o=i;const r=class{constructor(s){e(this,s);this.scCloseCart=t(this,"scCloseCart",7)}getItemsCount(){var e,t;const s=((t=(e=a.checkout)===null||e===void 0?void 0:e.line_items)===null||t===void 0?void 0:t.data)||[];let i=0;s.forEach((e=>{i=i+(e===null||e===void 0?void 0:e.quantity)}));return i}render(){var e;return s("div",{key:"a98d0178e7cee53855de66b2b8a482a7b3979b4f",class:"cart-header"},s("sc-icon",{key:"6d033a04e5bf15426db6bf0209adb82fc24f3518",class:"cart__close",name:"arrow-right",onClick:()=>this.scCloseCart.emit(),onKeyDown:e=>{if("Enter"===(e===null||e===void 0?void 0:e.code)||"Space"===(e===null||e===void 0?void 0:e.code)){this.scCloseCart.emit()}},tabIndex:0,role:"button","aria-label":wp.i18n.__("Close Cart","surecart")}),s("div",{key:"2fc4b580ae472ff20329a16a76a5d35090891c6e",class:"cart-title"},s("slot",{key:"f24d357acfa1ac9c5fa5c6382790c1c74f31d3d9"})),s("sc-tag",{key:"13ae05191d43b57a126fe93df4b520cd6c34f082",size:"small"},((e=this===null||this===void 0?void 0:this.getItemsCount)===null||e===void 0?void 0:e.call(this))||0))}};r.style=o;export{r as sc_cart_header};
//# sourceMappingURL=p-81ab6dc1.entry.js.map