import{j as r,u as s}from"./router.chunk.YsRm4bSN.js";import{u as o,aG as e,aH as n,aI as a,C as d,av as t,k as i,B as u,K as c,aW as f,J as m,aX as g}from"./main.chunk.N-eZ2ybB.js";import{_ as __}from"./wordpress.chunk.BVds2GcU.js";import{p as l}from"./index.chunk.CJx-PkC0.js";import{k as w}from"./forms.chunk.Bz8aaTWe.js";import{D as j}from"./date-picker-field.chunk.ipSHuuNj.js";import{D as p,C as h,A as x}from"./campaign-information-metrics.chunk.CDqEuZTP.js";import{A as k,R as v,T as _,a as b,b as y,c as N,C as D}from"./top-backers.chunk.D2cK3t_b.js";import{u as M}from"./use-form-query-sync.chunk.DqmzEVyi.js";import{ao as C}from"./icons.chunk.BwnSC3zE.js";import"./react-jsx-runtime.chunk.ATkk6v2S.js";import"./react.js";import"./react-dom-client.chunk.BMQ1litG.js";import"./react-dom.js";import"./pdf-core.chunk.D33I_Wdh.js";import"./ui-radix.chunk.Xzokq_Gv.js";import"./utils.chunk.C1IATKsN.js";import"./date-utils.chunk.DWRtWTmT.js";import"./loading-skeleton.chunk.sJ-6gSIX.js";import"./metrics-card.chunk.ao_0wOYX.js";import"./pro-badge.chunk.PstHsVdU.js";import"./tooltip.chunk.DtTQ21GF.js";import"./use-currency.chunk.QE--bLc6.js";import"./use-debounce.chunk.th480LZc.js";import"./filter.chunk.Bx8zQ-yD.js";import"./charts.chunk.BbweDdoQ.js";import"./dot-separator.chunk.CtyhSI2x.js";import"./progress.chunk.Bl335FuN.js";import"./goal-info.chunk.5sJIIQ8N.js";const T=()=>r.jsxs("div",{className:"growfund-mt-4 growfund-space-y-7",children:[r.jsx(p,{}),r.jsx(k,{}),r.jsxs("div",{className:"growfund-grid growfund-grid-cols-[23.75rem_auto] growfund-gap-7",children:[r.jsxs("div",{className:"growfund-space-y-7",children:[r.jsx(v,{}),r.jsx(_,{})]}),r.jsx(b,{})]})]}),G=()=>r.jsxs("div",{className:"growfund-mt-4 growfund-space-y-7",children:[r.jsx(h,{}),r.jsx(k,{}),r.jsxs("div",{className:"growfund-grid growfund-grid-cols-[23.75rem_auto] growfund-gap-7",children:[r.jsxs("div",{className:"growfund-space-y-7",children:[r.jsx(y,{}),r.jsx(N,{})]}),r.jsx(b,{})]})]}),P=()=>{const{isDonationMode:p}=o(),h=s(),k=w({resolver:m(x)});return M({keyMap:{start_date:l,end_date:l},form:k,paramsToForm:r=>({date_range:{from:r.start_date?new Date(r.start_date):null,to:r.end_date?new Date(r.end_date):null}}),formToParams:r=>({start_date:r.date_range?.from?g(r.date_range.from):null,end_date:r.date_range?.to?g(r.date_range.to):null}),watchFields:["date_range"]}),r.jsxs(e,{children:[r.jsx(n,{name:__("Home","growfund")}),r.jsx(a,{children:r.jsxs(d,{className:"growfund-my-6",children:[t.is_migration_available_from_crowdfunding&&r.jsxs("div",{className:"growfund-grid growfund-grid-cols-3 growfund-h-28 growfund-mb-6 growfund-rounded-md",children:[r.jsx(i,{src:"/images/migration-top-banner.webp",fit:"cover",className:"growfund-border-none growfund-bg-transparent growfund-size-full growfund-rounded-none growfund-rounded-l-md"}),r.jsxs("div",{className:"growfund-col-span-2 growfund-flex growfund-items-center growfund-justify-between growfund-w-full growfund-border growfund-border-border growfund-border-l-0 growfund-py-5 growfund-px-12 growfund-bg-white growfund-rounded-r-md",children:[r.jsxs("div",{className:"growfund-flex growfund-flex-col growfund-gap-1 growfund-w-80",children:[r.jsx("div",{className:"growfund-typo-h6 growfund-text-fg-primary",children:__("Migrate to Growfund","growfund")}),r.jsx("div",{className:"growfund-typo-small growfund-text-fg-secondary",children:__("Move to Growfund for the best crowdfunding experience in WordPress.","growfund")})]}),r.jsx("div",{className:"growfund-flex growfund-items-center growfund-gap-3",children:r.jsxs(u,{variant:"primary",onClick:r=>{r.preventDefault(),h("/migrate-from-crowdfunding")},children:[r.jsx(C,{}),__("Migrate Now","growfund")]})})]})]}),r.jsxs(c,{...k,children:[r.jsx(f,{title:__("Overview","growfund"),action:r.jsx("div",{children:r.jsx(j,{control:k.control,name:"date_range",placeholder:__("Date: Last 30 days","growfund"),type:"range",showRangePresets:!0,clearable:!0})})}),r.jsx(D,{children:p?r.jsx(T,{}):r.jsx(G,{})})]})]})})]})};export{P as default};
