import{j as e}from"./router.chunk.YsRm4bSN.js";import{_ as __,s as sprintf}from"./wordpress.chunk.BVds2GcU.js";import{bN as t,b5 as n,aR as s,D as r}from"./main.chunk.N-eZ2ybB.js";import{u as i}from"./pdf-context.chunk.DXMR6h2w.js";import{V as l,T as o,I as d}from"./pdf-core.chunk.D33I_Wdh.js";import{f as c}from"./date-utils.chunk.DWRtWTmT.js";const a=({pledge:s})=>{const{pdfReceiptTemplate:r}=i(),d=r?.colors?.secondary_text??"#636363";return e.jsxs(l,{style:{paddingTop:24,paddingBottom:8},children:[e.jsxs(l,{style:{flexDirection:"row"},children:[e.jsx(l,{style:{width:241},children:e.jsxs(l,{style:{marginBottom:4},children:[e.jsx(o,{style:{color:d},children:__("Backer Name","growfund")}),e.jsx(o,{style:{marginTop:2,fontWeight:"bold"},children:sprintf("%s %s",s.backer.first_name,s.backer.last_name)})]})}),e.jsx(l,{style:{marginLeft:8},children:e.jsxs(l,{style:{marginBottom:4},children:[e.jsx(o,{style:{color:d},children:__("Backer Address","growfund")}),e.jsx(o,{style:{marginTop:2,fontWeight:"bold"},children:t(s.backer.shipping_address)})]})})]}),e.jsx(l,{style:{flexDirection:"row",marginTop:8},children:e.jsx(l,{style:{width:241},children:e.jsxs(l,{style:{marginBottom:4},children:[e.jsx(o,{style:{color:d},children:__("Pledge To","growfund")}),e.jsx(o,{style:{marginTop:2,fontWeight:"bold"},children:s.campaign.title})]})})}),e.jsxs(l,{style:{flexDirection:"row",marginTop:"8px"},children:[e.jsx(l,{style:{width:241},children:e.jsxs(l,{style:{marginBottom:4},children:[e.jsx(o,{style:{color:d},children:__("Payment Method","growfund")}),e.jsx(o,{style:{marginTop:2,fontWeight:"bold"},children:s.payment.payment_method.label})]})}),e.jsx(l,{style:{marginLeft:"8px"},children:e.jsxs(l,{style:{marginBottom:4},children:[e.jsx(o,{style:{color:d},children:__("Transaction ID","growfund")}),e.jsx(o,{style:{marginTop:2,fontWeight:"bold"},children:s.payment.transaction_id??n(2)})]})})]})]})},h=({pledge:t})=>{const{pdfReceiptTemplate:n,toCurrency:h}=i(),x=n?.colors?.secondary_text??"#636363";return e.jsxs(e.Fragment,{children:[e.jsxs(l,{style:{padding:16,paddingBottom:12,backgroundColor:"#F7F7F7",borderRadius:6},children:[e.jsxs(l,{style:{flexDirection:"row",alignItems:"center",width:"100%"},children:[e.jsx(l,{style:{marginRight:16},children:e.jsx(d,{style:{width:72,height:72,borderRadius:6},src:t.campaign.images?.[0]?.url??s})}),e.jsxs(l,{style:{flexDirection:"column",marginLeft:8,width:"100%"},children:[e.jsx(o,{style:{width:"100%",fontWeight:"bold"},children:t.campaign.title}),e.jsx(o,{style:{width:"100%",color:x,marginTop:8},children:sprintf(__("%s items included","growfund"),t.reward?.items.length)}),e.jsxs(l,{style:{width:"100%",flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},children:[e.jsx(o,{style:{fontWeight:"bold",color:x},children:h(t.payment.amount??0,!1)}),e.jsxs(l,{style:{flexDirection:"column",alignItems:"flex-end"},children:[e.jsx(o,{style:{color:x},children:__("Date & Time","growfund")}),e.jsx(o,{style:{marginTop:4},children:c(t.created_at,r.HUMAN_READABLE_FULL_DATE_TIME)})]})]})]})]}),e.jsx(l,{style:{paddingTop:8},children:e.jsx(l,{style:{width:"100%",height:1,backgroundColor:"#E6E6E6"}})}),e.jsxs(l,{children:[e.jsxs(l,{style:{flexDirection:"row",justifyContent:"space-between",paddingTop:8},children:[e.jsx(o,{children:__("Pledge with a reward","growfund")}),e.jsx(o,{children:h(t.payment.amount??0,!1)})]}),e.jsxs(l,{style:{flexDirection:"row",justifyContent:"space-between",paddingTop:8},children:[e.jsx(o,{children:__("Bonus","growfund")}),e.jsx(o,{children:h(t.payment.bonus_support_amount??0,!1)})]}),e.jsxs(l,{style:{flexDirection:"row",justifyContent:"space-between",paddingTop:8},children:[e.jsx(o,{children:__("Shipping","growfund")}),e.jsx(o,{children:h(t.payment.shipping_cost??0,!1)})]}),e.jsxs(l,{style:{flexDirection:"row",justifyContent:"space-between",paddingTop:8},children:[e.jsx(o,{style:{fontWeight:"bold"},children:__("Total","growfund")}),e.jsx(o,{style:{fontWeight:"bold"},children:h(t.payment.total??0,!1)})]})]})]}),e.jsx(a,{pledge:t})]})},x=({pledge:t})=>{const{pdfReceiptTemplate:n,toCurrency:s}=i(),d=n?.colors?.secondary_text??"#636363";return e.jsxs(e.Fragment,{children:[e.jsx(l,{style:{padding:16,paddingTop:12,paddingBottom:12,backgroundColor:"#F7F7F7",borderRadius:6},children:e.jsxs(l,{style:{width:"100%",flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},children:[e.jsxs(l,{style:{flexDirection:"column",alignItems:"flex-start"},children:[e.jsx(o,{style:{width:"100%",color:d},children:__("Pledge Amount","growfund")}),e.jsx(o,{style:{fontWeight:"bold",fontSize:20,marginTop:8},children:s(t.payment.amount??0,!1)})]}),e.jsxs(l,{style:{flexDirection:"column",alignItems:"flex-end"},children:[e.jsx(o,{style:{color:d},children:__("Date & Time","growfund")}),e.jsx(o,{style:{marginTop:8},children:c(t.created_at,r.HUMAN_READABLE_FULL_DATE_TIME)})]})]})}),e.jsx(a,{pledge:t})]})};export{h as P,x as a};
