import{g as y,h as u,o as s,c as a,a as p,d as x,t as f,j as c,q as i,x as d,r as h,v as b,_ as g,s as w,H as v,p as C,f as B}from"./CJgu5QJ3.js";const S={class:"tw-whitespace-nowrap"},D=y({__name:"ProductTitle",props:{name:{},customClass:{default:"tw-text-[16px] md:tw-text-[22px] tw-leading-[1.045] tw-font-black tw-capitalize"}},setup(n){const e=n,r=u(()=>{const o=e.name.trim().split(" ");return o.length<3?"":o.slice(-2).join(" ")}),l=u(()=>r.value.length===0?e.name:e.name.substring(0,e.name.lastIndexOf(r.value)).trim());return(o,m)=>(s(),a("h3",{class:i(o.customClass)},[p("span",null,[x(f(c(l))+" ",1),p("span",S,f(c(r)),1)])],2))}}),E=y({__name:"ProductSubtitle",props:{numberOfItemsPerPack:{},withStatement:{},customClass:{default:"tw-block tw-text-[14px] md:tw-text-[19px] tw-font-medium tw-mb-1"}},setup(n){const e=n,r=u(()=>e.withStatement||e.numberOfItemsPerPack);return(l,o)=>c(r)?(s(),a("span",{key:0,class:i(l.customClass)},f(l.withStatement),3)):d("",!0)}}),O=["title"],$={key:1,class:"h-14 w-84"},I=y({__name:"Rating",props:{value:{default:0},alwaysFillStarSpace:{type:Boolean,default:!1}},setup(n){const e=n,r=h("background-image: url('/assets/images/star-a.svg');"),l=h("background-image: url('/assets/images/star-a-full.svg');"),o=u(()=>e.value*100/5),m=u(()=>`${e.value} out of 5.00`),t=u(()=>e.value>=4),_=u(()=>`width: ${o.value}%;`);return(k,T)=>(s(),a("div",{class:"product-rating",title:c(m)},[c(t)?(s(),a("div",{key:0,class:"h-14 w-84",style:b(c(r))},[p("span",{class:"block h-full",style:b(`${c(_)} ${c(l)}`)},null,4)],4)):d("",!0),!c(t)&&k.alwaysFillStarSpace?(s(),a("div",$)):d("",!0)],8,O))}}),H=g(I,[["__scopeId","data-v-35caf174"]]),q=n=>(C("data-v-c945ac64"),n=n(),B(),n),P=q(()=>p("span",null,"Sold Out",-1)),j=[P],N=["disabled"],V={class:"flex-1 px-5 text-center font-agendaCond font-medium leading-none sm:text-f22"},z=["disabled"],F=y({__name:"ProductControls",props:{quantity:{default:0},readOnly:{type:Boolean,default:!1},isSoldOut:{type:Boolean,default:!1},isBusy:{type:Boolean,default:!1},customClass:{default:"tw-bg-nl-green-300 tw-uppercase tw-text-[14px] md:tw-text-[20px] tw-font-bold tw-text-white tw-min-h-[30px] md:tw-min-h-[40px] tw-inline-flex tw-items-center tw-justify-center tw-w-full tw-shadow-nl-13 tw-rounded-[4px]"}},emits:["add","subtract"],setup(n,{emit:e}){const r=n,l=e,o=()=>{r.isBusy||l("add")},m=()=>{r.isBusy||l("subtract")};return(t,_)=>(s(),a("div",null,[t.isSoldOut?(s(),a("a",{key:0,onClick:w(o,["stop","prevent"]),href:"#",class:i([t.customClass,{"opacity-40":t.isBusy}])},j,2)):(s(),a(v,{key:1},[!t.quantity&&!t.readOnly?(s(),a("a",{key:0,onClick:w(o,["stop","prevent"]),href:"#",class:i([t.customClass,{"opacity-40":t.isBusy}]),"data-cy":"btn-add-to-cart"}," Add to Cart ",2)):d("",!0),t.quantity?(s(),a("div",{key:1,class:i([t.customClass," tw-justify-between tw-px-[22px]"])},[t.readOnly?d("",!0):(s(),a("button",{key:0,onClick:w(m,["stop","prevent"]),class:i(["tw-w-[30px] tw-h-[30px] tw-text-[24px] tw-leading-none tw-flex tw-items-center tw-justify-center tw-cursor-pointer -tw-mt-0.5",{"opacity-40":t.isBusy}]),"data-cy":"btn-subtract-item","aria-label":"decrease quantity",disabled:t.isBusy}," - ",10,N)),p("span",V,f(t.quantity),1),t.readOnly?d("",!0):(s(),a("button",{key:1,onClick:w(o,["stop","prevent"]),class:i(["tw-w-[30px] tw-h-[30px] tw-text-[24px] tw-leading-none tw-flex tw-items-center tw-justify-center tw-cursor-pointer -tw-mt-0.5",{"opacity-40":t.isBusy}]),"data-cy":"btn-increase-item","aria-label":"increase quantity",disabled:t.isBusy}," + ",10,z))],2)):d("",!0)],64))]))}}),L=g(F,[["__scopeId","data-v-c945ac64"]]);export{D as _,E as a,H as b,L as c};