1import{aP as a,aB as e,aR as u}from"./store-DUosIV5A.js";import p from"./PeopleServedInput-IOoRwUro.js";import d from"./SkipStepLink-CuckaMT0.js";import{o as g,a as h,u as b}from"./application-CegkUz9G.js";import{a as x}from"./index-CzF8G1rP.js";import"./AmountInputWithError-Bj0t4JDL.js";const f="/vite/assets/icon-ribbon-MfexngJD.svg",P=g(({trackSuccessfulUpdate:r})=>{const s=h.useRef(null),n=b(()=>({submitButtonDisabled:!1})),o=x(),i=()=>{$(s.current).parsley().validate()},m=t=>{t.preventDefault(),n.submitButtonDisabled=!0,u(()=>{const l=new FormData(t.target);e.campaign.updateCampaign(l,c),o(e.campaign.nextStepPath)})},c=t=>{r(t.updated_campaign_attributes,"raise-amount")};return a.jsxs(a.Fragment,{children:[a.jsx("h1",{className:"h35 font-heading font-normal border-none text-cw-black bg-none m-0 py-3",children:"Just like that, youâre on your way! Soon youâll be transforming lives with the gift of clean water."}),a.jsxs("form",{"data-parsley-validate":!0,onSubmit:m,ref:s,children:[a.jsx("input",{name:"_method",type:"hidden",value:"patch"}),a.jsx("input",{name:"authenticity_token",type:"hidden",value:e.campaign.authToken}),a.jsxs("label",{className:"tracking-wide mb-nudge",children:["How much would you like to fundraise, ",e.campaign.userName,"?"]}),a.jsx(p,{amount:e.campaign.goalAmount||e.campaign.defaultGoalAmount,costPerPerson:e.campaign.costPerPerson,currencyName:e.campaign.currencyName,currencyUnit:e.campaign.currencyUnit,hideImpact:!0,isCampaign:!0,isSubscription:!1,maxAmount:e.campaign.maxAmount,minAmount:e.campaign.costPerPerson,name:"campaign[goal_amount]",onChange:t=>i(),showError:!0,wrapperClassName:"goal-amount-modal-people-served"}),a.jsxs("div",{className:"flex flex-row justify-center items-start",children:[a.jsx("img",{height:"25",
1src:f,width:"20"}),a.jsx("p",{className:"p40 ml-1 text-grey-50 italic",dangerouslySetInnerHTML:{__html:`The average fundraiser has a goal of ${e.campaign.currencyUnit}${parseInt(e.campaign.costPerPerson)*15}, which provides clean water to 15 people.`}})]}),a.jsx("div",{className:"flex flex-row items-center pt-3",children:a.jsxs("button",{className:"button button--cw-yellow m-0 text-cw-black",disabled:n.submitButtonDisabled,type:"submit",children:[n.submitButtonDisabled&&a.jsx("i",{className:"cw-icon-loop cw-icon-spin mr-1"}),"Set goal"]})}),e.campaign.goalAmountIsNull&&a.jsx(d,{navigate:o,path:e.campaign.nextStepPath})]})]})});export{P as default}; 2//# sourceMappingURL=RaiseAmount-yDa8zIVw.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.