import{d as ae,u as se,c as u,q as M,e as r,f as l,j as w,B as H,i as A,h as I,bc as ue,Z as p,s as z,k as y,t as g,m as oe,D as ie,bL as d,aC as de,af as ve,a5 as _e,X as x,bb as F,_ as pe,V as ge,w as T,g as Y,ai as P,n as he,F as fe,r as ye,ah as be,a7 as ke,aB as ze,a1 as Ee,aP as Ie}from"./index-CYs9MVUz.js";import{C as Te}from"./CardWithBackgroundHeader-C20HCGHu.js";import{A as we}from"./AvatarList-B-ydyayK.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]="fd5010ac-bf2e-4480-aa27-babed89fb51c",o._sentryDebugIdIdentifier="sentry-dbid-fd5010ac-bf2e-4480-aa27-babed89fb51c")}catch{}})();const Ne={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(),h=u(()=>{var n,f,b;if(s!=null&&s.speakers&&((n=s==null?void 0:s.speakers)==null?void 0:n.length)<=s.max){const k=((f=s==null?void 0:s.speakers)==null?void 0:f.map(_=>_.name).filter(_=>_!==void 0))||[];try{return new Intl.ListFormat(a.value).format(k)}catch{return k.join(", ")}}else return t("count_speakers",{count:(b=s==null?void 0:s.speakers)==null?void 0:b.length})}),E=u(()=>{var n,f;return s!=null&&s.speakers&&((n=s==null?void 0:s.speakers)==null?void 0:n.length)>s.max?(((f=s==null?void 0:s.speakers)==null?void 0:f.map(k=>k.name))||[]).join("<br />"):null});return(n,f)=>{var _,O,v;const b=M("placeholder"),k=M("tooltip");return r(),l("div",Ne,[w(H,{name:"mic",class:"members__icon"}),(_=n.speakers)!=null&&_.length&&((O=n.speakers)==null?void 0:O.length)<=n.max?(r(),A(we,{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),z((r(),l("div",Be,[y(g(h.value),1)])),[[b,n.loading],[k,{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:h,named:E}=t;return a([h(E("count"))," speakers"])}},en:{count_speakers:t=>{const{normalize:a,interpolate:h,named:E}=t;return a([h(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"},De={class:"event__day"},Ae={class:"event__month"},Oe=["src"],Pe={class:"event__body"},He={key:0,class:"event__clubs"},Me={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"},Ze={key:2,class:"event__details"},Ge={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:h}=ve(),{redirectBounding:E}=_e(),n=o,f=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)}),k=u(()=>{var e;return[d.PHYSICAL,d.HYBRID].includes(v.value)?(e=n.event)==null?void 0:e.timezone:f.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:k.value});c+=` (${f.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"&&(h==null||h.track(Ie.COMMUNITY_EVENT_GO,{eventId:(e=n.event)==null?void 0:e.id}))}return(e,m)=>{var j,W,Z,G,K;const i=M("placeholder"),c=M("safe-html");return r(),A(Te,ze(me.value,{picture:e.event&&(((j=e.event)==null?void 0:j.image)||((W=e.event)==null?void 0:W.webPath)||((Z=e.event)==null?void 0:Z.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":((G=e.event)==null?void 0:G.active)===!1,"event--reverse":V.value,"event--hidden":((K=e.event)==null?void 0:K.isHidden)&&I(s).hasRole(I(Ee).ADMIN),"event--external":e.isExternalEvent}]],onClick:ce}),{header:T(()=>{var N,B,L,C,S,R;return[Y("div",Re,[z((r(),l("div",De,[y(g(_.value),1)])),[[i,{loading:e.loading,options:{width:"70%"}}]]),z((r(),l("div",Ae,[y(g(O.value),1)])),[[i,{loading:e.loading,options:{width:"70%"}}]])]),e.isExternalEvent?(r(),l("img",{key:0,src:(N=e.event)==null?void 0:N.webPath,class:"event__external-img"},null,8,Oe)):p("",!0),(L=(B=e.event)==null?void 0:B.metas)!=null&&L.participates?(r(),A(P,{key:1,class:he(["event__type",{"event__type--participate":(S=(C=e.event)==null?void 0:C.metas)==null?void 0:S.participates}])},{default:T(()=>[w(H,{name:"success"}),y(" "+g(I(t)("participate")),1)]),_:1},8,["class"])):(R=e.event)!=null&&R.eventType?(r(),A(P,{key:2,class:"event__type"},{default:T(()=>{var D;return[y(g(I(t)((D=e.event)==null?void 0:D.eventType)),1)]}),_:1})):p("",!0)]}),default:T(()=>{var N,B,L,C,S,R,D,q,X,J;return[Y("div",Pe,[(B=(N=e.event)==null?void 0:N.clubs)!=null&&B.length?(r(),l("div",He,[(r(!0),l(fe,null,ye(e.event.clubs,Q=>(r(),A(P,{key:Q.id,type:I(be).ALERT},{default:T(()=>[y(g(Q.name),1)]),_:2},1032,["type"]))),128))])):p("",!0),z((r(),l("div",Me,[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,[w(P,{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)?z((r(),l("div",Ye,[(R=e.event)!=null&&R.subtitle&&!e.loading?z((r(),l("span",$e,null,512)),[[c,(D=e.event)==null?void 0:D.subtitle]]):p("",!0)])),[[i,{loading:e.loading,options:{multiline:2}}]]):p("",!0)]),(q=e.event)!=null&&q.speakers&&((X=e.event)==null?void 0:X.speakers.length)>0?(r(),l("div",Ue,[w(Le,{speakers:(J=e.event)==null?void 0:J.speakers,loading:e.loading,class:"event__speakers"},null,8,["speakers","loading"])])):p("",!0),U.value?(r(),l("div",je,[w(H,{name:"public",class:"event__icon"}),z((r(),l("span",We,[y(g(U.value),1)])),[[i,{loading:e.loading,options:{width:"50%"}}]])])):p("",!0),$.value?(r(),l("div",Ze,[w(H,{name:"location-on",class:"event__icon"}),z((r(),l("span",Ge,[y(g($.value),1)])),[[i,{loading:e.loading,options:{width:"50%"}}]])])):p("",!0),ke(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 Je=oe(le,[["__scopeId","data-v-cbc186a5"]]);export{Je as E,te as f}; //# sourceMappingURL=EventCard-CPdvxZ89.js.map