import{d as c,u as d,h as r,o as a,b as i,t as p,n as m,B as f,_,L as b}from"./LrfSKRHt.js";const V=c({__name:"ProductPill",props:{customText:{default:void 0},type:{default:"normal"},size:{default:void 0}},setup(e){const t=e,o=d(),s=r(()=>{if(t.customText)return t.customText;if(t.type==="club-tag")return o.websiteTexts.productpill__clubprice;if(t.type==="outlet")return o.websiteTexts.productpill__outlet;if(t.type==="deal-tag")return o.websiteTexts.productpill__deal});return(l,n)=>(a(),i("div",{class:f(["product-pill",[l.type,l.size]])},p(m(s)||""),3))}}),w=_(V,[["__scopeId","data-v-8d67eaac"]]),x=()=>{const e=b(),t=r(()=>e.person),o=r(()=>e.customerNumber===null);return{isMember:r(()=>{var l;return((l=t==null?void 0:t.value)==null?void 0:l.isMember)??!1}),waitingForMemberStatus:o}},y=e=>{const t=new Date,o=e==null?void 0:e.map(l=>{var n;return new Date((n=l.fields)==null?void 0:n.DealValidFrom)}),s=e==null?void 0:e.map(l=>{var n,u;return(n=l.fields)!=null&&n.DealValidUntil?new Date((u=l.fields)==null?void 0:u.DealValidUntil):null});return o?o.every(l=>t>=l)&&s.every(l=>l?t<=l:!0):!1},S=e=>{const t=new Date,o=e!=null&&e.dealValidFrom?new Date(e.dealValidFrom):null,s=e!=null&&e.dealValidUntil?new Date(e.dealValidUntil):null;return o?t>=o&&(s?t<=s:!0):!1};export{w as _,S as a,y as d,x as u};