import{d as ae,u as se,c as u,q as P,e as r,f as l,j as N,B as M,i as D,h as I,ba as ue,X as p,s as k,k as y,t as g,m as oe,A as ie,bJ as d,aA as de,ad as ve,a3 as _e,V as x,b9 as F,_ as pe,T as ge,w as T,g as Y,ag as H,n as fe,F as he,r as ye,af as be,a5 as ze,az as ke,$ as Ee,aN as Ie}from"./index-bWjSJxiX.js";import{C as Te}from"./CardWithBackgroundHeader-DD1xrxbX.js";import{A as Ne}from"./AvatarList-C97kkLS9.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="53f625fc-26a9-4ae4-b324-c594efafa7bc",o._sentryDebugIdIdentifier="sentry-dbid-53f625fc-26a9-4ae4-b324-c594efafa7bc")}catch{}})();const we={class:"members"},Be={class:"members__names"},re=ae({__name:"EventMemberList",props:{loading:{type:Boolean},speakers:{default:()=>[]},max:{default:2}},setup(o){const s=o,{t,locale:a}=se(),f=u(()=>{var n,h,b;if(s!=null&&s.speakers&&((n=s==null?void 0:s.speakers)==null?void 0:n.length)<=s.max){const z=((h=s==null?void 0:s.speakers)==null?void 0:h.map(_=>_.name).filter(_=>_!==void 0))||[];try{return new Intl.ListFormat(a.value).format(z)}catch{return z.join(", ")}}else return t("count_speakers",{count:(b=s==null?void 0:s.speakers)==null?void 0:b.length})}),E=u(()=>{var n,h;return s!=null&&s.speakers&&((n=s==null?void 0:s.speakers)==null?void 0:n.length)>s.max?(((h=s==null?void 0:s.speakers)==null?void 0:h.map(z=>z.name))||[]).join("<br />"):null});return(n,h)=>{var _,O,v;const b=P("placeholder"),z=P("tooltip");return r(),l("div",we,[N(M,{name:"mic",class:"members__icon"}),(_=n.speakers)!=null&&_.length&&((O=n.speakers)==null?void 0:O.length)<=n.max?(r(),D(Ne,{key:0,pictures:n.speakers&&n.speakers.map(V=>V.picture||"").slice(0,n.max)||[],"more-item":((v=n.speakers)==null?void 0:v.length)-n.max,size:I(ue).MINI,loading:n.loading,class:"members__avatars"},null,8,["pictures","more-item","size","loading"])):p("",!0),k((r(),l("div",Be,[y(g(f.value),1)])),[[b,n.loading],[z,{content:E.value,html:!0,placement:"bottom-start",distance:12}]])])}}});function ee(o){const s=o;s.__i18n=s.__i18n||[],s.__i18n.push({locale:"",resource:{fr:{count_speakers:t=>{const{normalize:a,interpolate:f,named:E}=t;return a([f(E("count"))," speakers"])}},en:{count_speakers:t=>{const{normalize:a,interpolate:f,named:E}=t;return a([f(E("count"))," speakers"])}}}})}typeof ee=="function"&&ee(re);const Le=oe(re,[["__scopeId","data-v-7f5bcb38"]]),Ce=ie(),Se=u(()=>{var o;return((o=Ce.authentifiedUser)==null?void 0:o.timezone)||Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}),te=(o,s)=>{const t=(o==null?void 0:o.type)||d.EVENT,a=[d.PHYSICAL,d.HYBRID].includes(t)?o==null?void 0:o.timezone:Se.value;return de(o.date,{customFormat:s==null?void 0:s.customFormat,format:s==null?void 0:s.luxonFormat,zone:a})},Re={class:"event__date"},Ae={class:"event__day"},De={class:"event__month"},Oe=["src"],He={class:"event__body"},Me={key:0,class:"event__clubs"},Pe={class:"event__title"},Ve={key:1,class:"my-4"},Fe={class:"event__only-club-text text-sm"},Ye={key:2,class:"event__description"},$e={key:0},Ue={key:0},je={key:1,class:"event__details"},We={class:"event__location"},Ge={key:2,class:"event__details"},Ke={class:"event__location"},le=ae({__name:"EventCard",props:{event:{},small:{type:Boolean},detailed:{type:Boolean},loading:{type:Boolean},important:{type:Boolean},reverse:{type:Boolean},replay:{type:Boolean},disableLink:{type:Boolean},isExternalEvent:{type:Boolean}},setup(o){const s=ie(),{t,locale:a}=se(),{analytics:f}=ve(),{redirectBounding:E}=_e(),n=o,h=u(()=>{var e;return((e=s.authentifiedUser)==null?void 0:e.timezone)||Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}),b=u(()=>{var e;return((e=n.event)==null?void 0:e.startDate)&&new Date(n.event.startDate)}),z=u(()=>{var e;return[d.PHYSICAL,d.HYBRID].includes(v.value)?(e=n.event)==null?void 0:e.timezone:h.value}),_=u(()=>{var e,m,i,c;return((e=n.event)==null?void 0:e.startDate)&&te({type:(m=n.event)==null?void 0:m.eventType,timezone:(i=n.event)==null?void 0:i.timezone,date:(c=n.event)==null?void 0:c.startDate},{customFormat:"dd"})}),O=u(()=>{var e,m,i,c;return((e=n.event)==null?void 0:e.startDate)&&te({type:(m=n.event)==null?void 0:m.eventType,timezone:(i=n.event)==null?void 0:i.timezone,date:(c=n.event)==null?void 0:c.startDate},{customFormat:"MMM"})}),v=u(()=>{var e;return n.event&&((e=n.event)==null?void 0:e.eventType)||d.EVENT}),V=u(()=>{var e;return((e=n.event)==null?void 0:e.isClub)||(n==null?void 0:n.reverse)}),$=u(()=>{var m,i;const e=[];return[d.PHYSICAL,d.HYBRID].includes(v.value)?(e.push(((m=n.event)==null?void 0:m.city)||t(v.value===d.NETWORKING?"networking_in_app":v.value)),(i=n.event)!=null&&i.startDate&&e.push(x.fromISO(n.event.startDate,{setZone:!0}).toLocaleString(x.TIME_24_SIMPLE)+` (${t("timezone")})`),e.join(" - ")):""}),U=u(()=>{var m,i;const e=[];if(![d.LIVE,d.NETWORKING,d.HYBRID].includes(v.value))return"";if(e.push(((m=n.event)==null?void 0:m.city)||t(v.value===d.NETWORKING?"networking_in_app":v.value)),b.value){let c=(i=b.value)==null?void 0:i.toLocaleString(a.value,{hour:"numeric",minute:"numeric",timeZone:z.value});c+=` (${h.value})`,e.push(c)}return e.join(" - ")}),me=u(()=>{var e,m,i,c;return n.loading||n.disableLink?{tag:"div"}:(e=n.event)!=null&&e.externalUrl?{tag:"a",href:n.event.externalUrl,target:"_blank"}:F.PRO!=="lenetwork"&&((m=n.event)!=null&&m.publicUrl||F.LECLUB==="lenetwork")&&n.replay?{tag:pe,to:{name:ge.EVENT_REPLAY,params:{id:(i=n.event)==null?void 0:i.id,eventSlug:((c=n.event)==null?void 0:c.slug)||""}}}:E({event:n.event})});function ce(){var e;F.LENETWORK==="lenetwork"&&(f==null||f.track(Ie.COMMUNITY_EVENT_GO,{eventId:(e=n.event)==null?void 0:e.id}))}return(e,m)=>{var j,W,G,K,Z;const i=P("placeholder"),c=P("safe-html");return r(),D(Te,ke(me.value,{picture:e.event&&(((j=e.event)==null?void 0:j.image)||((W=e.event)==null?void 0:W.webPath)||((G=e.event)==null?void 0:G.picture)),small:e.small,"extra-small":!e.small,loading:e.loading,important:e.important,class:["event",[`event--${v.value}`,{"event--detailed":e.detailed,"event--draft":((K=e.event)==null?void 0:K.active)===!1,"event--reverse":V.value,"event--hidden":((Z=e.event)==null?void 0:Z.isHidden)&&I(s).hasRole(I(Ee).ADMIN),"event--external":e.isExternalEvent}]],onClick:ce}),{header:T(()=>{var w,B,L,C,S,R;return[Y("div",Re,[k((r(),l("div",Ae,[y(g(_.value),1)])),[[i,{loading:e.loading,options:{width:"70%"}}]]),k((r(),l("div",De,[y(g(O.value),1)])),[[i,{loading:e.loading,options:{width:"70%"}}]])]),e.isExternalEvent?(r(),l("img",{key:0,src:(w=e.event)==null?void 0:w.webPath,class:"event__external-img"},null,8,Oe)):p("",!0),(L=(B=e.event)==null?void 0:B.metas)!=null&&L.participates?(r(),D(H,{key:1,class:fe(["event__type",{"event__type--participate":(S=(C=e.event)==null?void 0:C.metas)==null?void 0:S.participates}])},{default:T(()=>[N(M,{name:"success"}),y(" "+g(I(t)("participate")),1)]),_:1},8,["class"])):(R=e.event)!=null&&R.eventType?(r(),D(H,{key:2,class:"event__type"},{default:T(()=>{var A;return[y(g(I(t)((A=e.event)==null?void 0:A.eventType)),1)]}),_:1})):p("",!0)]}),default:T(()=>{var w,B,L,C,S,R,A,q,J,X;return[Y("div",He,[(B=(w=e.event)==null?void 0:w.clubs)!=null&&B.length?(r(),l("div",Me,[(r(!0),l(he,null,ye(e.event.clubs,Q=>(r(),D(H,{key:Q.id,type:I(be).ALERT},{default:T(()=>[y(g(Q.name),1)]),_:2},1032,["type"]))),128))])):p("",!0),k((r(),l("div",Pe,[y(g((L=e.event)==null?void 0:L.title),1)])),[[i,{loading:e.loading,options:e.detailed?{}:{multiline:2}}]]),(C=e.event)!=null&&C.isClub?(r(),l("div",Ve,[N(H,{class:"event__only-club"},{default:T(()=>[Y("div",Fe,g(I(t)("club_only")),1)]),_:1})])):p("",!0),e.detailed&&(e.loading||(S=e.event)!=null&&S.subtitle)?k((r(),l("div",Ye,[(R=e.event)!=null&&R.subtitle&&!e.loading?k((r(),l("span",$e,null,512)),[[c,(A=e.event)==null?void 0:A.subtitle]]):p("",!0)])),[[i,{loading:e.loading,options:{multiline:2}}]]):p("",!0)]),(q=e.event)!=null&&q.speakers&&((J=e.event)==null?void 0:J.speakers.length)>0?(r(),l("div",Ue,[N(Le,{speakers:(X=e.event)==null?void 0:X.speakers,loading:e.loading,class:"event__speakers"},null,8,["speakers","loading"])])):p("",!0),U.value?(r(),l("div",je,[N(M,{name:"public",class:"event__icon"}),k((r(),l("span",We,[y(g(U.value),1)])),[[i,{loading:e.loading,options:{width:"50%"}}]])])):p("",!0),$.value?(r(),l("div",Ge,[N(M,{name:"location-on",class:"event__icon"}),k((r(),l("span",Ke,[y(g($.value),1)])),[[i,{loading:e.loading,options:{width:"50%"}}]])])):p("",!0),ze(e.$slots,"add-actions",{},void 0,!0)]}),_:3},16,["picture","small","extra-small","loading","important","class"])}}});function ne(o){const s=o;s.__i18n=s.__i18n||[],s.__i18n.push({locale:"",resource:{fr:{event:t=>{const{normalize:a}=t;return a(["Event"])},networking:t=>{const{normalize:a}=t;return a(["Networking"])},live:t=>{const{normalize:a}=t;return a(["En ligne"])},physical:t=>{const{normalize:a}=t;return a(["Physique"])},hybrid:t=>{const{normalize:a}=t;return a(["Hybride"])},networking_in_app:t=>{const{normalize:a}=t;return a(["Sur notre app mobile"])},timezone:t=>{const{normalize:a}=t;return a(["horaire local"])},club_only:t=>{const{normalize:a}=t;return a(["Réservé membres Club"])},participate:t=>{const{normalize:a}=t;return a(["Vous participez"])}},en:{event:t=>{const{normalize:a}=t;return a(["Event"])},networking:t=>{const{normalize:a}=t;return a(["Networking"])},live:t=>{const{normalize:a}=t;return a(["Online"])},physical:t=>{const{normalize:a}=t;return a(["Physique"])},hybrid:t=>{const{normalize:a}=t;return a(["Hybrid"])},networking_in_app:t=>{const{normalize:a}=t;return a(["On our app mobile"])},timezone:t=>{const{normalize:a}=t;return a(["local schedule"])},club_only:t=>{const{normalize:a}=t;return a(["Reserved Club members"])},participate:t=>{const{normalize:a}=t;return a(["You participate"])}}}})}typeof ne=="function"&&ne(le);const Xe=oe(le,[["__scopeId","data-v-cbc186a5"]]);export{Xe as E,te as f}; //# sourceMappingURL=EventCard-BSVPgQHS.js.map