1import{u as b,a7 as L,b as F,j as e,w as j,B as x,a9 as P,z as p,bA as q,p as C,cX as S,c as z,c5 as v,E as A,cY as I}from"./index-BJijipAU.js";import{r as w}from"./locale-CY-vkBv4.js";import{P as W}from"./PriceTag-BlVU4LY6.js";import{P as T}from"./PromoCountdown-ClUj1v4C.js";import{u as B}from"./useRequestAccess-XovFMKjC.js";import{T as R}from"./timer-BzUuke8i.js";import"./i18n-DlcS6BNz.js";import"./index-paNpr7jU.js";function D({formation:s,variant:r="default"}){const{t:a,i18n:t}=b("lms"),o=t.language,{pathname:N}=L(),{requestAccess:_,isIos:y,isRequesting:k}=B(),g=N.startsWith("/public/")?"/public":"",m=F(l=>l.enrollmentsSnapshot.some(c=>String(c.formation_id)===String(s.id))),i=s.cover_images?.[0]??s.thumbnail_img,n=w(s.title,o),d=i?i.startsWith("http")||i.startsWith("/")?i:`https://s3.eu-central-003.backblazeb2.com/maxskills-dev/${i}`:null;if(r==="v1")return e.jsxs(j,{to:`${g}/formations/${s.slug}`,className:"flex flex-col no-underline transition-transform duration-300 hover:-translate-y-[5px] mb-[30px] group",children:[e.jsxs("div",{className:"relative flex-1 overflow-hidden rounded-[5%]",children:[m&&e.jsx(x,{className:"absolute top-3 start-3 z-10 bg-primary/90 backdrop-blur-sm text-white border-none text-[10px]",children:"Inscrit"}),d?e.jsx(P,{src:d,alt:n,className:"w-full object-fill border border-[#7cc4f32e] rounded-[5%] max-h-[295px]",style:{height:"92%"}}):e.jsx("div",{className:"w-full aspect-[3/4] max-h-[295px] bg-[#1e1f25] border border-[#7cc4f32e] rounded-[5%] flex items-center justify-center",children:e.jsx(p,{className:"h-10 w-10 text-white/20"})})]}),e.jsx("div",{className:"text-center py-2",children:e.jsx("span",{className:"text-white font-medium text-sm leading-tight line-clamp-2 min-h-[2.4em] group-hover:text-[#F8994F] transition-colors",children:n})})]});const f=s.price_promo!==null&&s.price_promo!==void 0&&s.price_promo!==""&&parseFloat(String(s.price_promo))<parseFloat(String(s.price_standard??0)),$=l=>{if(l<=0)return"";const c=Math.floor(l/60),h=l%60;return c===0?`${h}m`:h===0?`${c}H`:`${c}H ${h}m`},u=s.total_minutes!=null&&s.total_minutes>0?$(s.total_minutes):null;return e.jsx(j,{to:`${g}/formations/${s.slug}`,className:"block group h-full",children:e.jsxs("div",{className:"bg-[#1e1f25]/50 border border-[#1e1f25] rounded-2xl overflow-hidden hover:border-primary/50 transition-all duration-300 hover:shadow-lg hover:shadow-primary/10 h-full flex flex-col",children:[e.jsxs("div",{className:"relative aspect-video overflow-hidden bg-[#000216]",children:[d?e.jsx(q,{src:d,alt:n,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-[#2d2e35]",children:e.jsx(p,{className:"h-10 w-10 text-white/20"})}),m&&e.jsx(x,{className:"absolute top-3 start-3 bg-primary/90 backdrop-blur-sm text-white border-none text-[10px]",children:"Inscrit"}),s.status==="coming_soon"&&e.jsxs(x,{className:"absolute top-3 start-3 bg-blue-500/90 backdrop-blur-sm text-white border-none text-[10px] flex items-center gap-1",children:[e.jsx(R,{className:"h-3 w-3"}),a("formations.coming_soon")]}),f&&s.status!=="coming_soon"&&e.jsx(x,{className:"absolute top-3 end-3 bg-primary/90 backdrop-blur-sm text-white border-none text-[10px]",children:"Promo"}),f&&s.status!=="coming_soon"&&s.promo_ends_at&&e.jsx(T,{endsAt:s.promo_ends_at,className:"absolute bottom-3 end-3"})]}),e.jsxs("div",{className:"p-4 flex flex-col flex-1",children:[e.jsx("h3",{className:"text-base font-bold text-white mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:n}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2",children:[(u||s.lessons_count!==void 0||s.projects_count!==void 0)&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[u&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-orange-500 text-white text-xs font-medium px-2.5 py-1 hover:bg-gray-500 transition-colors cursor-default",children:[e.jsx(C,{className:"h-3 w-3"}),u]}),s.lessons_count!==void 0&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-orange-500 text-white text-xs font-medium px-2.5 py-1 hover:bg-gray-500 transition-colors cursor-default",children:[e.jsx(p,{className:"h-3 w-3"}),s.lessons_count]}),s.projects_count!==void 0&&s.projects_count>0&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-orange-500 text-white text-xs font-medium px-2.5 py-1 hover:bg-gray-500 transition-colors cursor-default",children:[e.jsx(S,{className:"h-3 w-3"}),s.projects_count]})]}),e.jsx("div",{className:"pt-2 border-t border-white/5",children:e.jsx(W,{standard:s.price_standard,promo:s.price_promo})}),!m&&s.status!=="coming_soon"&&e.jsx("button",{disabled:k,onClick:l=>{l.preventDefault(),l.stopPropagation(),_({id:s.id,slug:s.slug})},className:"w-full rounded-xl bg-primary text-white text-xs font-semibold py-3 hover:bg-primary/80 transition-colors disabled:opacity-50",children:y?a("access.request_access_short"):"S'inscrire maintenant"})]})]})]})})}function E({formation:s}){const{t:r,i18n:a}=b(),t=s.cover_images?.[0]??s.thumbnail_img,o=t?t.startsWith("http")||t.startsWith("/")?t:`https://s3.eu-central-003.backblazeb2.com/maxskills-dev/${t}`:null;return e.jsxs("div",{className:"bg-[#1e1f25]/50 border border-[#1e1f25] rounded-2xl overflow-hidden h-full flex flex-col opacity-60",children:[e.jsxs("div",{className:"relative aspect-video overflow-hidden bg-[#000216]",children:[o?e.jsx("img",{src:o,alt:"",className:"w-full h-full object-cover grayscale"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center bg-[#2d2e35]",children:e.jsx(v,{className:"h-10 w-10 text-white/20"})}),e.jsxs("div",{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center gap-2",children:[e.jsx("div",{className:"h-10 w-10 rounded-full bg-white/10 border border-white/20 grid place-items-center",children:e.jsx(A,{className:"h-5 w-5 text-white"})}),e.jsx("span",{className:"text-[11px] font-semibold text-white bg-black/40 px-2.5 py-1 rounded-full",children:r("my_network.formations_locked_until",{stage:s.required_stage_label})})]})]}),e.jsx("div",{className:"p-4",children:e.jsx("h3",{className:"text-base font-bold text-white/70 line-clamp-2",children:w(s.title,a.language)})})]})}function Y(){const{t:s}=b(),{data:r,isLoading:a}=z({queryKey:["network-formations"],queryFn:I});return e.jsxs("div",{className:"px-4 sm:px-6 lg:px-10 py-6 lg:py-8 max-w-[1400px] w-full mx-auto",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-white",children:s("my_network.formations_title")}),e.jsx("p",{className:"text-sm text-[#aaaebb] mt-1",children:s("my_network.formations_subtitle")})]}),a?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:[...Array(3)].map((t,o)=>e.jsx("div",{className:"h-72 rounded-2xl bg-white/5 animate-pulse"},o))}):!r||r.length===0?e.jsxs("div",{className:"rounded-2xl border border-white/5 bg-[#13141a] p-11 flex flex-col items-center text-center gap-2",children:[e.jsx("div",{className:"h-11 w-11 rounded-full bg-white/5 border border-white/10 flex items-center justify-center text-[#aaaebb]",children:e.jsx(v,{className:"h-5 w-5"})}),e.jsx("p",{className:"text-[14.5px] font-bold text-white",children:s("my_network.formations_empty")})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:r.map(t=>t.locked?e.jsx(E,{formation:t},t.id):e.jsx(D,{formation:t},t.id))})]})}export{Y as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.