import{d as M,u as O,ad as V,a4 as W,Q as K,c as g,bJ as _,au as q,q as L,h as s,s as v,e as u,i as y,w as p,g as w,ag as P,k as m,t as f,f as B,W as Q,az as C,j as G,B as U,X as E,v as A,aC as F,aG as H,Z as Y,aN as j,m as J}from"./index-bWjSJxiX.js";import{E as X}from"./Event.api-De5loNTa.js";import{f as Z}from"./EventCard-BSVPgQHS.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="c1e8cca8-dca4-43a4-88da-f518687bc2dd",o._sentryDebugIdIdentifier="sentry-dbid-c1e8cca8-dca4-43a4-88da-f518687bc2dd")}catch{}})();const $={class:"card__details"},ee={class:"card__title"},ae={key:0,class:"card__actions"},z=M({__name:"EventCardHighlighted",setup(o){const{t:n}=O(),{analytics:l}=V(),{data:c,isLoading:d}=W({queryKey:[K.EVENT_SUGGESTED],queryFn:X.getSuggestedEvents}),e=g(()=>{var a,t;return(t=(a=c.value)==null?void 0:a.data)==null?void 0:t[0]}),S=g(()=>{var a,t,r,i;return(a=e==null?void 0:e.value)!=null&&a.startDate?Z({type:(t=e.value)==null?void 0:t.eventType,timezone:(r=e.value)==null?void 0:r.timezone,date:(i=e.value)==null?void 0:i.startDate},{customFormat:"dd MMMM"}):""}),N=g(()=>{var a,t,r,i;return((a=e.value)==null?void 0:a.eventType)===_.NETWORKING?{to:{name:q.EVENT_NETWORKING_SINGLE,params:{slug:(t=e.value)==null?void 0:t.id}}}:(r=e.value)!=null&&r.url?{href:(i=e.value)==null?void 0:i.url,target:"_blank",rel:"noopener noreferrer"}:{}});function x(){var a;l==null||l.track(j.COMMUNITY_EVENT_GO,{eventId:(a=e.value)==null?void 0:a.id})}return(a,t)=>{var i;const r=L("placeholder");return s(d)||e.value?v((u(),y(Y,{key:0,class:"card",style:H({backgroundImage:`url(${(i=e.value)==null?void 0:i.image})`})},{default:p(()=>{var h,T,I,k,b,D;return[t[0]||(t[0]=w("div",{class:"card__overlay"},null,-1)),w("div",$,[v((u(),y(P,{important:"",class:"card__date"},{default:p(()=>[m(f(S.value),1)]),_:1})),[[r,{loading:s(d),options:{width:"100px"}}]]),v((u(),B("div",ee,[m(f((h=e.value)==null?void 0:h.title),1)])),[[r,{loading:s(d),options:{width:"50%"}}]]),((T=e.value)==null?void 0:T.eventType)===s(_).NETWORKING||(I=e.value)!=null&&I.url?v((u(),y(Q(((k=e.value)==null?void 0:k.eventType)===s(_).NETWORKING?"RouterLink":"a"),C({key:0},N.value,{class:"card__link"}),{default:p(()=>[m(f(s(n)("more"))+" ",1),G(U,{legacy:"",name:"arrow-right",class:"card__icon"})]),_:1},16)),[[r,{loading:s(d),options:{width:"200px"}}]]):E("",!0)]),((b=e.value)==null?void 0:b.eventType)===s(_).NETWORKING||(D=e.value)!=null&&D.url?(u(),B("div",ae,[G(F,C({theme:s(A).PRIMARY},N.value,{class:"card__button",onClick:x}),{default:p(()=>[m(f(s(n)("participate")),1)]),_:1},16,["theme"])])):E("",!0)]}),_:1},8,["style"])),[[r,s(d)]]):E("",!0)}}});function R(o){const n=o;n.__i18n=n.__i18n||[],n.__i18n.push({locale:"",resource:{fr:{more:l=>{const{normalize:c}=l;return c(["En savoir plus"])},participate:l=>{const{normalize:c}=l;return c(["Participer"])}}}})}typeof R=="function"&&R(z);const ne=J(z,[["__scopeId","data-v-7665aa24"]]);export{ne as E};
//# sourceMappingURL=EventCardHighlighted-mJrFzP09.js.map