1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1464],{7488:(e,s,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/edit/stripe",function(){return i(36008)}])},36008:(e,s,i)=>{"use strict";i.r(s),i.d(s,{StripeAccounts:()=>S,StripePageInner:()=>A,__N_SSP:()=>y,default:()=>w});var t=i(37876),n=i(92306),r=i(75656),c=i(55006),l=i(19512),d=i(77328),a=i.n(d);i(14232);var o=i(61875),x=i(95364),p=i(55737),u=i(4186),h=i(48230),j=i.n(h),_=i(88707),v=i(75919),f=i(24949),m=i(80381),N=i(75209),y=!0;function w({seller:e,sellerId:s,...i}){let{selectedSellerId:n,sellerIsSet:r}=(0,p.n)();return r&&n?(0,t.jsx)(A,{seller:e,sellerId:n}):(0,t.jsx)(c.A,{})}function g({sellerId:e}){let{data:s,mutate:i}=(0,r.Ay)(I(e),(0,n.we)()),{message:c,setMessage:d}=(0,m.x)();async function a(s){d("Refreshing, please wait."),await fetch("/api/edit/seller/stripe_update",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({sellerId:e,stripeAccountId:s})}),i()}async function o(s){let t=await fetch("/api/edit/seller/stripe_mark_active",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({sellerId:e,stripeAccountId:s})});await t.text(),i()}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-row gap-2 text-sm p-1",children:[(0,t.jsx)("div",{className:"w-[300px]",children:"Stripe acc"}),(0,t.jsx)("div",{className:"w-[300px]",children:"Stripe id"}),(0,t.jsx)("div",{className:"w-[300px]",children:"Ready"}),(0,t.jsx)("div",{}),(0,t.jsx)("div",{})]}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:s?.stripeAccounts?.map((e,s)=>{let i=e.account_json?.settings?.dashboard?.display_name;return(0,t.jsxs)("div",{className:"flex flex-row gap-2 bg-neutral-800 p-1 items-center rounded-md",children:[(0,t.jsx)("div",{className:"w-[300px]",children:i||"-"}),(0,t.jsx)("div",{className:"w-[300px]",children:e.stripe_account_id}),(0,t.jsx)("div",{className:"w-[100px]",children:e.is_ready?(0,t.jsx)(u.e8G,{}):(0,t.jsx)(u.m6K,{})}),(0,t.jsx)("div",{children:(0,t.jsx)(l.A,{onClick:()=>a(e.stripe_account_id),children:"Refresh"})}),(0,t.jsxs)("div",{children:[" ",(0,t.jsx)(l.A,{disabled:!e.is_ready,onClick:()=>o(e.stripe_account_id),children:"Activate"})]})]},e.id)})})]})}function A({seller:e,sellerId:s,...i}){return(0,t.jsxs)(x.Ay,{hideNav:!0,children:[(0,t.jsx)(a(),{children:(0,t.jsx)("title",{children:"Stripe"})}),(0,t.jsxs)(v.InnerSection1200NoMargin,{children:[(0,t.jsx)(o.Av,{children:"Configure Stripe"}),(0,t.jsx)(S,{sellerId:s}),(0,t.jsx)("div",{className:" mt-16 flex flex-col gap-2 text-brand",children:(0,t.jsx)(j(),{href:`/manage?sellerId=${s}&tab=${N.MERCH_TAB}`,children:"Return to your Manage Page"})})]})]})}function I(e){return`/api/edit/seller/stripe_accounts?sellerId=${e||""}`}function S({sellerId:e}){let{data:s,mutate:i}=(0,r.Ay)(I(e),(0,n.we)());return(0,t.jsxs)("div",{children:[s?.seller?.active_stripe_account_id?(0,t.jsx)("div",{className:"text-mygreen",children:"Your stripe account is connected"}):s?.stripeAccounts?.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm py-4",children:"To complete setup, please ensure you have configured your stripe identity information and verified your email. Then refresh and activate."}),(0,t.jsx)(g,{sellerId:e})]}):(0,t.jsx)(f.StripeConnect,{sellerId:e}),(0,t.jsxs)(_.E,{children:[(0,t.jsxs)("div",{className:"mt-4",children:["active accountId: ",s?.seller?.active_stripe_account_id," / ",s?.seller?.stripe_account_id]}),(0,t.jsx)("div",{children:(0,t.jsx)(g,{sellerId:e})})]})]})}}},e=>{e.O(0,[3629,9559,4949,5209,636,6593,8792],()=>e(e.s=7488)),_N_E=e.O()}]);
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.