import{s as sprintf,b as _n,_ as __}from"./wordpress.chunk.BVds2GcU.js";const o=(o,n,r)=>{if(!o.has_goal)return null;switch(o.goal_type){case"raised-amount":return{progress_percentage:o.fund_raised&&o.goal_amount?Number((o.fund_raised/o.goal_amount*100).toFixed(2)):0,gained:r(o.fund_raised??0),goal_label:sprintf(
/* translators: 1: raised amount, 2: goal amount */
__('<span class="growfund-text-fg-primary">%1$s</span> of %2$s',"growfund"),r(o.fund_raised??0),r(o.goal_amount??0)),goal_amount:r(o.goal_amount??0)};case"number-of-contributions":return{progress_percentage:o.number_of_contributions&&o.goal_amount?Number((o.number_of_contributions/o.goal_amount*100).toFixed(2)):0,gained:o.number_of_contributions,goal_label:sprintf(n?
/* translators: 1: number of donations, 2: goal amount */_n("%1$s donation of %2$s","%1$s donations of %2$s",o.number_of_contributions??0,"growfund"):
/* translators: 1: number of pledges, 2: goal amount */_n("%1$s pledge of %2$s","%1$s pledges of %2$s",o.number_of_contributions??0,"growfund"),o.number_of_contributions??0,o.goal_amount??0),goal_amount:o.goal_amount};case"number-of-contributors":return{progress_percentage:o.number_of_contributors&&o.goal_amount?Number((o.number_of_contributors/o.goal_amount*100).toFixed(2)):0,gained:o.number_of_contributors,goal_label:sprintf(n?
/* translators: 1: number of donors, 2: goal amount */_n("%1$s donor of %2$s","%1$s donors of %2$s",o.number_of_contributors??0,"growfund"):
/* translators: 1: number of backers, 2: goal amount */_n("%1$s backer of %2$s","%1$s backers of %2$s",o.number_of_contributors??0,"growfund"),o.number_of_contributors??0,o.goal_amount),goal_amount:o.goal_amount};default:return null}};export{o as g};
