1import{v as b,cG as N,m as q,cH as P,B as g,x as n,y as m,C as a,D as i,I as h,Y as c,aj as w,aL as I,M as s,O as x,aJ as C,ah as u,a1 as y,a2 as o,a5 as _,a4 as f,j as d,am as T}from"./index.ccd35ebd.js";import L from"./GiftDetails.1f0ebcb9.js";const A={name:"CartItem",props:["allowLinksInCart","content","dense","preventDelete","hideItemPrice","hideItemName","hideItemImage"],components:{ContentItemPrices:N,GiftDetails:L},data(){return{showGiftDetails:!1}},computed:{...q(["cart","GIFT_CONTENT_ID"]),isGiftCardContent(){return this.content.id===this.GIFT_CONTENT_ID},renewalDate(){return P(this.content)},renewalAmount(){const l=this.content.selectedPurchaseOption||{},r=l.discountRenewalAmount||l.originalAmount||l.amount;return r?this.$formatMoney(r):null}},methods:{toggleGiftDetails(){this.isGiftCardContent&&(this.showGiftDetails=!this.showGiftDetails)},removeContentFromCart(){this.$store.dispatch("removeFromCart",this.content),this.$emit("cart-item-removed",this.content),this.cart.length===0&&this._emit("close-dialog")},openCartItem(l){if(this.isGiftCardContent||!this.allowLinksInCart)return;const r=this.$store.getters.contentPermLink(l.id);window.open(r)}}},F={class:"row no-wrap items-start full-width q-col-gutter-sm"},O={class:"col text-right"},Q={key:1,class:"full-width text-caption q-pt-xs text-grey-9 text-bold"},B={key:1,class:"text-caption text-right text-contentsToCheck-8 full-width q-pt-sm text-grey-9 text-bold"};function S(l,r,t,z,D,e){const k=g("ContentItemPrices"),v=g("GiftDetails");return n(),m("span",null,[l.$q.screen.lt.sm?(n(),a(_,{key:0,class:c(["column q-pa-sm q-my-sm rounded-borders",{"curs
1or-pointer":e.isGiftCardContent}]),clickable:e.isGiftCardContent,onClick:e.toggleGiftDetails},{default:i(()=>[h("div",F,[t.hideItemImage?s("",!0):(n(),m("div",{key:0,class:c(["col-auto flex flex-center",{"cursor-pointer":e.isGiftCardContent}])},[e.isGiftCardContent?(n(),a(w,{key:0,name:"fa fa-gift",color:"orange",class:"rounded-borders",size:"lg"})):(n(),a(I,{key:1,height:"96px",class:"rounded-borders",width:"96px",fit:"contain",src:l.$store.getters.getContentImageCover(t.content)},null,8,["src"]))],2)),h("div",O,[t.hideItemPrice?s("",!0):(n(),a(k,{key:0,content:t.content,"is-checkout":!1,"purchase-option":t.content.selectedPurchaseOption.id},null,8,["content","purchase-option"]))]),!t.dense&&!t.preventDelete?(n(),a(x,{key:1,class:"col-auto",size:"sm",round:"",flat:"",color:"red-3",icon:"fa fa-trash","data-test":`button-cart-remove-${t.content.id}`,onClick:C(e.removeContentFromCart,["stop"])},null,8,["data-test","onClick"])):s("",!0)]),t.hideItemName?s("",!0):(n(),a(u,{key:0,class:c(["full-width text-body2 q-mt-sm",{"cursor-pointer":t.allowLinksInCart}]),"data-test":"text-cart-contentname",title:t.content.contentName,onClick:r[0]||(r[0]=C(G=>e.openCartItem(t.content),["stop"]))},{default:i(()=>[y(o(t.content.contentName),1)]),_:1},8,["class","title"])),e.renewalDate&&e.renewalAmount?(n(),m("div",Q," Renews "+o(e.renewalDate)+" for "+o(e.renewalAmount)+" USD, unless canceled ",1)):s("",!0)]),_:1},8,["class","clickable","onClick"])):(n(),a(_,{key:1,class:"q-px-sm full-width justify-between items-center",clickable:e.isGiftCardContent,onClick:e.toggleGiftDetails},{default:i(()=>[t.hideItemImage?s("",!0):(n(),a(f,{key:0,avatar:"",top:"",class:c(e.isGiftCardContent?"flex flex-center q-mr-md cursor-pointer":""),style:{width:"80px",height:"80px"}},{default:i(()=>[e.isGiftCardContent?(n(),a(w,{key:0,name:"fa fa-gift",color:"orange",class:"rounded-borders",size:"lg"})):(n(),a(I,{key:1,height:"100%",class:"rounded-borders q-mr-xs",width:"80px",fit:"
1contain",src:l.$store.getters.getContentImageCover(t.content)},null,8,["src"]))]),_:1},8,["class"])),t.hideItemName?s("",!0):(n(),a(f,{key:1},{default:i(()=>[d(u,{class:c(["text-body2",{"cursor-pointer":t.allowLinksInCart}]),"data-test":"text-cart-contentname",title:t.content.contentName,onClick:r[1]||(r[1]=G=>e.openCartItem(t.content))},{default:i(()=>[y(o(t.content.contentName),1)]),_:1},8,["class","title"])]),_:1})),d(f,{side:""},{default:i(()=>[d(u,{class:"text-right text-black align-end justify-end"},{default:i(()=>[t.hideItemPrice?s("",!0):(n(),a(k,{key:0,content:t.content,"is-checkout":!1,"purchase-option":t.content.selectedPurchaseOption.id},null,8,["content","purchase-option"])),e.renewalDate&&e.renewalAmount?(n(),m("div",B,[h("div",null,"Renews "+o(e.renewalDate)+" for "+o(e.renewalAmount)+" USD, unless canceled",1)])):s("",!0)]),_:1})]),_:1}),d(f,{side:""},{default:i(()=>[d(u,null,{default:i(()=>[!t.dense&&!t.preventDelete?(n(),a(x,{key:0,class:"q-my-sm",size:"sm",round:"",flat:"",color:"red-3",icon:"fa fa-trash","data-test":`button-cart-remove-${t.content.id}`,onClick:C(e.removeContentFromCart,["stop"])},null,8,["data-test","onClick"])):s("",!0)]),_:1})]),_:1})]),_:1},8,["clickable","onClick"])),e.isGiftCardContent?(n(),a(T,{key:2},{default:i(()=>[D.showGiftDetails?(n(),a(v,{key:0,details:t.content.selectedPurchaseOption},null,8,["details"])):s("",!0)]),_:1})):s("",!0)])}var V=b(A,[["render",S]]);export{V as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.