1import{c as h,j as e,I as m,a as g,b as j,o as y,r as x,Q as i,R as d,bU as S}from"./index-CSsSX63M.js";import{S as b}from"./SectionTitle-CqftPwho.js";import{S as N}from"./utilities-CoYgNjuY.js";import{u as v}from"./useSidebarSelector-DmuCPkFc.js";import{g as P,S as w}from"./gatewayLogos-nfiFFEog.js";import{S as C}from"./Stripe-Dqcgkn5M.js";import"./Grid-DNX_ExZZ.js";import"./index-CCVDs4O5.js";import"./HelpOutlined-CNQRJ5wk.js";import"./ArrowBack-C2ef7Myz.js";import"./OverlayTrigger-DxqfTLm5.js";import"./useTimeout-DMefeYIR.js";import"./mergeOptionsWithPopperConfig-Kl50-gi5.js";import"./useIsomorphicEffect-DOgrT-SO.js";const M=t=>{const s=h(),a=P(t);return e.jsx(m,{lg:6,children:e.jsxs("div",{className:`item-card ${t.enabled===!1?"item-card-disabled":""}`,children:[e.jsxs("div",{className:"item-card-header d-flex justify-content-between align-items-center",children:[e.jsxs("div",{className:"item-card-logo d-flex align-items-center gap-2",children:[e.jsx("img",{src:a,alt:`${t.name}-logo`}),e.jsx("span",{children:t.name})]}),e.jsx(w,{status:t.status})]}),e.jsx("div",{className:"item-card-body",children:e.jsx("p",{children:t.description})}),e.jsx("div",{className:"item-card-footer d-flex justify-content-end",children:e.jsx(g,{disabled:t.enabled===!1,onClick:()=>{s(`${t.id}`,{state:{...t}})},children:t.buttonText||"Manage"})})]})},t.id)},B=()=>{v(S.billingMyPay);const t=h(),s=j(),a=new URLSearchParams(s.search),r=a.get("stripe"),u=a.get("message"),c=a.get("xendit"),o=a.get("xendit_message"),{t:f}=y(),{data:l}=C.useGetGateways(),p=((l==null?void 0:l.data)||[]).filter(n=>n.id!=="mypay");return x.useEffect(()=>{r&&(r==="success"?i(!0,"Connection Successful","Your Stripe account has been successfully connected to Prosperna."):i(!1,"Connection Failed",u||"An error occurred while connecting your Str
1ipe account."),t(s.pathname,{replace:!0}))},[r,u,s.pathname,t]),x.useEffect(()=>{c&&(c==="success"?i(!0,"Xendit Setup Started",o||"Your Xendit account setup has started. Please check your email and complete the onboarding steps."):i(!1,"Xendit Setup Failed",o||"An error occurred while starting your Xendit setup."),t(s.pathname,{replace:!0}))},[c,o,s.pathname,t]),e.jsxs(e.Fragment,{children:[e.jsx(d,{className:"mt-1",children:e.jsx(m,{lg:12,children:e.jsx(b,{title:"Payment Settings",popContent:f("Accept payments from different payment channels.")})})}),e.jsx(d,{className:"mt-1",children:e.jsx(m,{lg:12,children:e.jsx(N,{className:"mb-3",children:e.jsxs("div",{className:"p-3",children:[e.jsx("h4",{children:"Prosperna Payments"}),e.jsx("p",{className:"text-muted",children:"Improve your customer experience by offering a wide range of payment options."}),e.jsx(d,{className:"mt-3",children:p.length>0?p.map(n=>e.jsx(M,{...n},n.id)):e.jsx("p",{children:"No payment gateways available"})})]})})})})]})};export{B as default};
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.