import{d as w,i as B,k as N,m as V,ae as Y,c as A,h as a,o as s,b as c,w as e,g as F,F as M,r as P,e as o,ag as R,C as y,I as h,v as l,eB as S,Z as $}from"./Co_VNPRB.js";import{u as z}from"./Brp_LIKq.js";import{_ as E,a as I}from"./Ur_gbG7o.js";import{_ as L}from"./DOLoQtUP.js";import{_ as O}from"./DIFnni_G.js";import"./xE-U1JZx.js";import"./B9Vb0_go.js";const j=w({__name:"Rebates",props:{id:{type:String,required:!0}},async setup(g){let n,i;const u=g,{$ecommerce:b}=B(),{format:k,relative:C}=z(),{data:m}=([n,i]=N(()=>V(`products_${u.id}_rebates`,()=>b.fetch("rebates",{params:{filters:`ProductId==${u.id}`}}),{getCachedData:Y})),n=await n,i(),n),D=A(()=>{var r;return((r=m.value)==null?void 0:r.items)??[]});return(r,T)=>{var f;const d=$,_=E,p=L,q=I,v=O;return(f=a(m))!=null&&f.items.length?(s(),c(v,{key:0},{default:e(()=>[(s(!0),F(M,null,P(a(D),t=>{var x;return s(),c(q,{key:t.id,href:t.url??((x=t.file)==null?void 0:x.url),target:"_blank"},{default:e(()=>[t.url||t.file?(s(),c(_,{key:0,avatar:""},{default:e(()=>[o(d,{icon:a(R),size:"xl",color:"secondary"},null,8,["icon"])]),_:1})):y("",!0),o(_,null,{default:e(()=>[o(p,{class:"text-h6 text-weight-medium"},{default:e(()=>[h(l(t.title),1)]),_:2},1024),o(p,{class:"text-body2"},{default:e(()=>[h(" Ends "+l(a(C)(t.endDt))+" ("+l(a(k)(t.endDt,"MMM D, YYYY"))+") ",1)]),_:2},1024)]),_:2},1024),o(_,{avatar:""},{default:e(()=>[o(d,{icon:a(S),size:"xl","text-color":"secondary"},null,8,["icon"])]),_:1})]),_:2},1032,["href"])}),128))]),_:1})):y("",!0)}}}),W=Object.assign(j,{__name:"ProductRebates"});export{W as default}; //# sourceMappingURL=njF17f8T.js.map