1import{A as d,H as p,G as l,u,r as f,j as s,D as b}from"./index-BZAaBzkS.js";import{P as g}from"./PublicLayout-BQvhXedy.js";import{u as h}from"./useQuery-DjyDcgfd.js";import"./PoweredByFlexischools-B0b02h_u.js";const m=d.supplierBffBaseUrl,x=new p(m,()=>Promise.resolve(""),{headers:{"x-brandid":l().brandConfiguration.brandId}}),L=async(e,r)=>x.put(`/suppliers/${e}/onboard/stripe/refresh`,{body:{accountId:r},throwOnError:!0}),U=(e,r)=>h({queryKey:["refreshOnboardingLink",e,r],queryFn:()=>L(e,r),enabled:!!e&&!!r}),P=()=>{var o;const{search:e}=u(),r=new URLSearchParams(e),a=r.get("supplierKey")??"",i=r.get("accountId")??"",{data:n,isError:c}=U(a,i);return f.useEffect(()=>{var t;(t=n==null?void 0:n.data)!=null&&t.onboardingUrl&&window.location.replace(n.data.onboardingUrl)},[(o=n==null?void 0:n.data)==null?void 0:o.onboardingUrl]),s.jsx(g,{children:s.jsx("div",{className:"text-center",children:c?s.jsx("p",{children:"Failed to refresh your Stripe onboarding URL. Please contact support."}):s.jsx(s.Fragment,{children:s.jsx(b,{})})})})};export{P 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.