import{r as t,c as s,h as e}from"./p-dfbe004d.js";import{o as r}from"./p-d63f2554.js";const i=class{constructor(e){t(this,e),this.scCloseCart=s(this,"scCloseCart",7)}getItemsCount(){let t=0;return(this.lineItems||[]).forEach((s=>{t+=null==s?void 0:s.quantity})),t}render(){var t;return e("div",{class:"cart-header"},e("sc-icon",{class:"cart__close",name:"arrow-right",onClick:()=>this.scCloseCart.emit()}),e("div",{class:"cart-title"},e("slot",null)),e("sc-tag",{size:"small"},(null===(t=null==this?void 0:this.getItemsCount)||void 0===t?void 0:t.call(this))||0))}};r(i,["lineItems"],!1),i.style=".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}";export{i as sc_cart_header}