1import{aB as r,aP as e}from"./store-DUosIV5A.js";/* empty css */import g from"./CampaignCard-sJfrVxmD.js";import p from"./SearchBar-CC2rSWfv.js";import{c as m}from"./index-B_D4uYdN.js";import{L as x}from"./loading-CeufUnn4.js";import{n as f}from"./no-results-img-Bv4kUXKJ.js";import{o as u,a as j}from"./application-CegkUz9G.js";const k=u(s=>{const{campaigns:i,isSubmitting:n,page:t,totalPages:c}=r.campaignSearch;j.useEffect(()=>{r.campaignSearch.parentCampaignId=s.parentCampaignId,r.campaignSearch.fetchChildCampaigns()},[]);const d=()=>c>1,l=a=>n||t===a,o=a=>{r.campaignSearch.page=a,r.campaignSearch.fetchChildCampaigns()},h=()=>i[0]?i.map(a=>e.jsx(g,{campaign:a,pill:null},a.id)):e.jsxs("div",{className:"no-results-container flex flex-col justify-center items-center py-10 px-5 gap-7 self-stretch rounded bg-cw-white",children:[e.jsx("img",{alt:"no results img",className:"no-results-img",src:f}),e.jsxs("div",{className:"text flex flex-col items-center gap-2 text-center",children:[e.jsx("div",{className:"header heading-l",children:"No results found"}),e.jsxs("p",{className:"body-m",children:["We couldnât find what you searched for. ",e.jsx("br",{})," Try searching again."]})]})]});return e.jsxs("div",{className:"campaign-search theme-design-system-v1 bg-cw-brand-yellow-100 flex flex-col px-6 lg-px-18 items-center",id:"top-of-campaign-search",children:[e.jsx("h2",{className:"header heading-xl mx-auto text-center pb-6",children:s.header}),s.subheader&&e.jsx("div",{className:"subheader body-default mx-auto text-center pb-10",children:s.subheader}),s.showSearchField&&e.jsx(p,{}),n?e.jsx("div",{className:"loading-gif p-10",children:e.jsx("img",{alt:"loading-gif",src:x})}):e.jsx("div",{className:"campaign-cards-wrapper pt-6 flex lg-flex-wrap lg-flex-row flex-col lg-self-stretch items-center justify-center gap-x-12 gap-y-16",children:h()}),d()&&e.jsxs("div",{className:"pages-container flex justify-center items-center gap-8 pt-16",children:[e.jsx("a",{className:m("prev-arrow w-6 h-4 bg-no-repeat",{disabled:l(1)}),href:"#top-of-campaign-search",onClick:()=>o(t-1)}),e.jsx("div",{className:"heading-m page-number text-cw-black",children:`${t} of ${c}`}),e.jsx("a",{className:m("next-arrow w-6 h-4 bg-no-repeat",{disabled:l(c)}),href:"#top-of-campaign-search",onClick:()=>o(t+1)})]})]})});export{k as default}; 2//# sourceMappingURL=ParentCampaignSearch-_mfXTy8Y.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.