1import{f as y,j as e,c as x,r as q,u as v,a as C,L as u,H as E,G as F,J as L,I as z,E as T,X as _}from"./index-Bk0-EBsY.js";import{R as j}from"./richText-DO_MzStI.js";import{C as A}from"./select-DAdNW5De.js";import{A as S}from"./AuthFooter-BeX_vt8I.js";import{u as H}from"./useGetLandingPageInfo-DrK56UqR.js";import{s as R,L as B}from"./LanguageSelector-epTBXSRl.js";import{P as M}from"./plus-CJFnc7D8.js";import"./Combination-D-V3hAkC.js";import"./index-B2zmfYFQ.js";import"./index-DVNpyuKk.js";import"./useQuery-B6Aioj9X.js";const O=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],w=y("circle-check-big",O);const P=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],G=y("file-text",P),$=({children:l,classNames:t})=>e.jsx("div",{className:x("px-3 md:px-4 max-w-[1024px] mx-auto",t),children:l}),D={default:{root:"flex flex-col gap-3",item:"bg-white border border-[#F0F0EE] rounded-3xl overflow-hidden",trigger:"w-full flex items-center justify-between gap-4 p-5 text-left rounded-3xl outline-none cursor-pointer",question:"font-bold text-sm text-primary rounded-3xl",icon:"shrink-0 text-neutral transition-transform duration-200",iconOpen:"rotate-180",content:"grid transition-[grid-template-rows] duration-200 ease-out ",answer:"px-5 pb-5 text-sm text-neutral"},card:{root:"flex flex-col gap-4",item:"bg-tech-25 rounded-2xl overflow-hidden",trigger:"w-full flex items-center justify-between gap-4 p-[20px] text-left",question:"font-bold text-base text-primary",icon:"shrink-0 text-primary transition-transform duration-200",iconOpen:"rotate-180",content:"grid transition-[grid-template-rows] duration-200 ease-out",answer:"px-[20px] pb-[20px] text-sm text-neutral"},minimal:{root:"flex flex-col",item:"border-b border-[#F0F0EE]",trigger:"w-full flex items-center justify-between gap-4 py-[16px] text-left",question:"font-bold text-sm text-primary",icon:"shrink-0 text-neutral transition-transform duration-200",iconOpen:"rotate-180",content:"grid transition-[grid-template-rows] duration-200 ease-out",answer:"pb-[16px] text-xs text-neutral"}},V=({items:l,type:t="single",variant:i="default",defaultOpen:s=[],classNames:f,icons:c,isAnswerHtml:d})=>{const[a,g]=q.useState(()=>new Set(s)),k=D[i],o=n=>x(k[n],f?.[n]),I=n=>{g(h=>{const r=new Set(h);return r.has(n)?r.delete(n):(t==="single"&&r.clear(),r.add(n)),r})};return e.jsx("div",{className:o("root"),children:l.map((n,h)=>{const r=n.id??h,m=a.has(r),b=`faq-panel-${r}`,N=`faq-trigger-${r}`;return e.jsxs("div",{className:o("item"),children:[e.jsxs("button",{type:"button",id:N,"aria-expanded":m,"aria-controls":b,onClick:()=>I(r),className:o("trigger"),children:[e.jsx("span",{className:o("question"),children:n.question}),c&&(m?c.open:c.close),!c&&e.jsx(A,{size:18,className:x(o("icon"),m&&o("iconOpen"))})]}),e.jsx("section",{id:b,"aria-labelledby":N,className:o("content"),style:{gridTemplateRows:m?"1fr":"0fr"},children:e.jsx("div",{className:"overflow-hidden",children:d?e.jsx(j,{className:o("answer"),html:n.answer}):e.jsx("div",{className:o("answer"),children:n.answer})})})]},r)})})},p=({className:l,children:t})=>e.jsx("section",{className:x("bg-white border border-[#F0F0EE] rounded-3xl p-4 sm:p-6 overflow-hidden",l),children:t}),K=()=>{const{t:l}=v(),t=C(i=>!!i.cognitoToken);return e.jsxs("header",{className:"px-6 h-15 bg-white flex justify-between items-center",children:[e.jsx("div",{children:e.jsx("img",{src:R,alt:"Ailin logo",className:"h-6 w-19"})}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(B,{}),t?e.jsx(u,{to:"/",className:"btn-primary-outline md",children:l("Go to dashboard")}):e.jsx(u,{to:"/login",className:"btn-primary-outline md",children:l("Connect")})]})]})},ne=function(){const{t}=v(),{landingId:i}=E.useParams(),{data:s,isLoading:f,isError:c}=H(i);if(f)return e.jsx(F,{});if(c)return e.jsx(L,{label:"The page you are looking for doesn't exist",type:"notfound",errorId:"xxx",message:"The route is unavailable or no longer exists. Return to the start to continue browsing"});if(!s)return null;const d=s.cta.state==="already_applied"?{badgeClass:"bg-[#fdf0e6] text-[#e07b39]",Icon:z,text:t("You already have a request for this programme.")}:s.cta.state==="blocked"&&s.cta.reason==="country_not_allowed"?{badgeClass:"bg-[#fdeaea] text-[#d64545]",Icon:T,text:t("This programme is not available in your country.")}:{badgeClass:"bg-[#e6f7ee] text-[#3aab6d]",Icon:w,text:t("Activate health initiatives.")};return e.jsxs("div",{className:"bg-tech-25 min-h-screen flex flex-col ",children:[e.jsx(K,{}),e.jsxs($,{classNames:"flex flex-col gap-11 my-11 grow w-full",children:[e.jsxs(p,{className:"p-0 sm:p-0 flex flex-col sm:flex-row",children:[e.jsx("div",{className:"",children:e.jsx("img",{className:"w-full sm:max-w-2xs h-full ",src:s.landing.coverImage,alt:"avant1"})}),e.jsxs("div",{className:"p-4 sm:p-7 flex flex-col gap-4 grow",children:[e.jsxs("span",{className:x("flex items-center gap-1 py-1.5 px-3 rounded-full w-fit text-[11px] font-bold",d.badgeClass),children:[e.jsx(d.Icon,{className:"shrink-0",size:"14"}),d.text]}),e.jsxs("div",{className:"flex justify-between items-start gap-3 flex-col sm:flex-row sm:items-center",children:[e.jsx("h4",{children:s.landing.title||t("Title not available")}),s.cta.state==="enroll"&&e.jsx(u,{to:"/enrollment/$eventID",params:{eventID:i},className:"btn-primary h-10! px-5! rounded-full cursor-pointer",children:t("Sign up")}),s.cta.state==="already_applied"&&e.jsx(u,{to:"/programs",className:"btn-primary h-10! px-5! rounded-full cursor-pointer",children:t("View program")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-primary-300",children:s.landing.supportedBy.text}),e.jsx("span",{className:"btn-primary-outline",children:e.jsx("img",{className:"w-full h-6",src:s.landing.supportedBy.logoAsset,alt:"logo"})})]}),e.jsx(j,{className:"text-[13px] text-neutral",html:s.landing.intro})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-8 gap-3",children:[e.jsxs(p,{className:"sm:col-span-5",children:[e.jsx("p",{className:"font-bold text-[15px]",children:t("What does the programme include?")}),e.jsx(j,{className:"text-xs text-neutral mt-3.5",html:s.landing.description})]}),e.jsxs(p,{className:"sm:col-span-3 sm:row-span-2",children:[e.jsx("p",{className:"font-bold text-[15px]",children:t("Information resources.")}),e.jsx("ul",{className:"flex flex-col gap-4 mt-3.5",children:s.landing.materials.map(a=>e.jsxs("button",{type:"button",onClick:()=>window.open(a.asset,"_blank"),className:"bg-tech-25 flex items-center gap-3 rounded-[16px] p-4 border border-tech-50 cursor-pointer",children:[e.jsx("div",{className:"rounded-[10px] bg-[#F0F0EE] flex items-center justify-center w-10 h-10",children:a.title&&e.jsx(G,{size:"18"})}),e.jsxs("span",{className:"text-[10px] font-bold",children:[a.title,"."]}),e.jsx("span",{className:"px-1.5 py-1 text-neutral text-[10px] bg-[#F0F0EE] rounded-full uppercase",children:a.type})]},a.title))})]}),e.jsxs(p,{className:"sm:col-span-5",children:[e.jsx("p",{className:"font-bold text-[15px]",children:t("Participation criteria")}),e.jsx("ul",{className:"mt-3.5 flex flex-col gap-2.5",children:s.landing.requisites.map(a=>e.jsxs("li",{className:"flex items-center gap-2.5 text-xs text-neutral",children:[e.jsx(w,{className:"text-success shrink-0",size:"14"}),a.text]},a.text))})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[15px] font-bold mb-5",children:t("Frequently asked questions")}),e.jsx(V,{isAnswerHtml:!0,icons:{close:e.jsx(M,{size:"12"}),open:e.jsx(_,{size:"12"})},type:"multiple",items:s.landing.faq.map((a,g)=>({id:g,question:a.question,answer:a.answer}))})]})]}),e.jsx("div",{className:"sticky bottom-0",children:e.jsx(S,{})})]})};export{ne as component};
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.