1import{aP as e,aX as o}from"./store-DUosIV5A.js";import u from"./MapDrawer-BEBOMFpG.js";import{c as d}from"./index-B_D4uYdN.js";import{p as n}from"./pluralize-Dcj-xPJf.js";import{a as i}from"./application-CegkUz9G.js";import"./Modal-CeM2dICs.js";const g=i.forwardRef(({countryDetails:m,preloadImageUrl:p},x)=>{var a,l,c;const r=m||{},[t,s]=i.useState("completed-projects"),b=()=>{s("completed-projects")};return e.jsx(u,{modalId:"country-details",onCloseCallback:b,preloadImageUrl:p,ref:x,children:e.jsx("div",{className:"overflow-y-auto absolute top-0 left-0 right-0 bottom-0",children:e.jsxs("div",{className:"inner-content flex flex-col text-cw-brand-black",children:[((c=(l=(a=r.image)==null?void 0:a.data)==null?void 0:l.file)==null?void 0:c.url)&&e.jsx("img",{alt:`${r.name} country image`,src:r.image.data.file.url}),e.jsxs("div",{className:"px-6 py-8",children:[e.jsx("h3",{className:"heading-xl",children:r.name}),e.jsx("p",{className:"mt-3 text-xs xl-text-sm",children:r.description})]}),e.jsxs("div",{className:"px-6 pb-8",children:[e.jsxs("div",{className:"tab-buttons border-b border-solid border-grey-30 flex gap-6 mb-5",children:[e.jsx("button",{className:d("label-2xs pb-2",{"text-cw-brand-black border-b-2 border-cw-brand-yellow-500 mb-0":t==="completed-projects","text-cw-brand-grey-700":t!=="completed-projects"}),onClick:()=>s("completed-projects"),children:"Completed projects"}),r.included_in_the_current&&e.jsx("button",{className:d("label-2xs pb-2",{"text-cw-brand-black border-b-2 border-cw-brand-yellow-500 mb-0":t==="recent-updates","text-cw-brand-grey-700":t!=="recent-updates"}),onClick:()=>s("recent-updates"),children:"Recent Updates"})]}),t==="completed-projects"&&e.jsxs("div",{className:"completed-projects-tab bg-cw-white w-full rounded border border-solid border-grey-30 flex justify-around py-5",children:[e.jsxs("div",{className:"people-served flex flex-col items-center",children:[e.jsx("p",{className:"heading-l",children:o(r.people_served_number)}),e.jsxs("p",{className:"text-2xs xl-text-xs",children:["est."," ",n("person",r.people_served_number,!1)," ","served"]})]}),e.jsxs("div",{className:"funded-projects flex flex-col items-center",children:[e.jsx("p",{className:"heading-l",children:o(r.funded_water_projects)}),e.jsxs("p",{className:"text-2xs xl-text-xs",children:["water"," ",n("project",r.funded_water_projects,!1)]})]})]}),t==="recent-updates"&&e.jsxs("div",{className:"recent-updates-tab bg-cw-brand-yellow-300 w-full rounded border border-solid border-grey-30 p-6 flex flex-col items-center",children:[e.jsxs("p",{className:"text-center",children:["Check out our most recent updates from ",r.name]}),e.jsx("a",{className:"cw-button button mt-3 text-2xs",href:`/current?country_filter=${r.code}`,children:"View the current"})]})]})]})})})});export{g as default}; 2//# sourceMappingURL=CountryDetailsDrawer-CZvWhVcZ.js.map
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.