import{r as n,j as r}from"./router.chunk.YsRm4bSN.js";import{_ as __}from"./wordpress.chunk.BVds2GcU.js";import{n as e,o as s,k as a,v as d}from"./main.chunk.N-eZ2ybB.js";import{u as t}from"./use-currency.chunk.QE--bLc6.js";const o=({status:n})=>{switch(n){case"paid":return r.jsx(d,{variant:"primary",children:__("PAID","growfund")});case"unpaid":return r.jsx(d,{variant:"warning",children:__("UNPAID","growfund")});case"failed":return r.jsx(d,{variant:"destructive",children:__("FAILED","growfund")});default:return null}},u=({amount:d,donationStatus:u,payment_method:f})=>{const{toCurrency:i}=t(),c=n.useCallback(()=>{switch(u){case"completed":return"paid";case"pending":default:return"unpaid";case"failed":case"cancelled":return"failed"}},[u]);return r.jsx(e,{children:r.jsxs(s,{children:[r.jsxs("div",{className:"growfund-flex growfund-items-center growfund-justify-between",children:[r.jsxs("h6",{className:"growfund-typo-h6 growfund-font-semibold growfund-text-fg-primary growfund-flex growfund-items-center growfund-gap-2",children:[__("Payment","growfund"),!!f&&r.jsxs("div",{className:"growfund-flex growfund-items-center growfund-gap-1",children:[r.jsx("span",{className:"growfund-typo-tiny growfund-text-fg-secondary",children:__("via","growfund")}),r.jsx(a,{src:f.logo,alt:f.label,className:"growfund-size-4 growfund-border-none growfund-bg-transparent",fit:"contain",aspectRatio:"square"}),r.jsx("span",{className:"growfund-typo-small growfund-font-medium growfund-text-fg-primary",children:f.label})]})]}),r.jsx(o,{status:c()})]}),r.jsx(e,{className:"growfund-mt-3",children:r.jsxs(s,{className:"growfund-p-3",children:[r.jsxs("div",{className:"growfund-flex growfund-items-center growfund-justify-between growfund-typo-small growfund-text-fg-primary growfund-min-h-7",children:[r.jsx("span",{children:__("Donation","growfund")}),r.jsx("span",{className:"growfund-font-medium",children:i(d)})]}),r.jsxs("div",{className:"growfund-flex growfund-items-center growfund-justify-between growfund-typo-small growfund-font-medium growfund-text-fg-primary growfund-min-h-9",children:[r.jsx("span",{children:__("Total","growfund")}),r.jsx("span",{children:i(d)})]})]})})]})})};export{u as P};
