import{Ao as e,Do as t,Eo as n,Mo as r,No as i,Oo as a,jo as o,ko as s,nf as c,of as l,rf as u}from"./messages-CIE1P6Ia.js";import{r as d}from"./route-C4XEM2Zs.js";import{f,n as p,p as m,r as h,v as g}from"./data-table-C0LADkf1.js";import{t as _}from"./badge-D9XQKFh1.js";import{t as v}from"./use-table-url-state-BGiHMi-Q.js";var y=l(u(),1),b=c(),x=[{name:`GMPay`,entries:[{method:`POST`,path:`/payments/gmpay/v1/order/create-transaction`}],requestFields:[`order_id`,`currency`,`token`,`network`,`amount`,`notify_url`,`signature`,`redirect_url?`,`name?`,`payment_type?`],callbackNote:t()},{name:`EPay Compatible`,entries:[{method:`POST`,path:`/payments/epay/v1/order/create-transaction/submit.php`},{method:`GET`,path:`/payments/epay/v1/order/create-transaction/submit.php`}],requestFields:[`pid`,`money`,`out_trade_no`,`notify_url`,`return_url?`,`name?`,`type?`,`sign`,`sign_type?`],callbackNote:n()}];function S({method:e}){return(0,b.jsx)(_,{className:e===`GET`?`rounded border border-blue-500/30 bg-blue-500/10 font-mono text-blue-600 dark:text-blue-400`:`rounded border border-emerald-500/30 bg-emerald-500/10 font-mono text-emerald-600 dark:text-emerald-400`,variant:`outline`,children:e})}function C({field:e}){return(0,b.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-foreground text-xs`,children:e})}function w({item:e}){let t=e.entries.reduce((e,t)=>(e[t.path]||(e[t.path]=[]),e[t.path].push(t.method),e),{});return(0,b.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:Object.entries(t).map(([e,t])=>(0,b.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,b.jsx)(`div`,{className:`flex gap-1.5`,children:t.map(e=>(0,b.jsx)(S,{method:e},e))}),(0,b.jsx)(`code`,{className:`whitespace-normal break-words font-mono text-sm`,children:e})]},e))})}function T({fields:e}){return(0,b.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.map(e=>(0,b.jsx)(C,{field:e},e))})}var E=d(`/_authenticated/payment-setup/integrations`);function D(){let{pagination:t,onPaginationChange:n,ensurePageInRange:c}=v({search:E.useSearch(),navigate:E.useNavigate(),pagination:{defaultPage:1,defaultPageSize:10}}),l=f({data:x,columns:(0,y.useMemo)(()=>[{accessorKey:`name`,header:o(),cell:({row:e})=>(0,b.jsx)(`span`,{className:`font-medium`,children:e.original.name})},{accessorKey:`entries`,header:e(),cell:({row:e})=>(0,b.jsx)(w,{item:e.original})},{accessorKey:`requestFields`,header:s(),cell:({row:e})=>(0,b.jsx)(T,{fields:e.original.requestFields})},{accessorKey:`callbackNote`,header:a(),cell:({row:e})=>(0,b.jsx)(`span`,{className:`whitespace-normal break-words text-muted-foreground text-sm`,children:e.original.callbackNote})}],[]),state:{pagination:t},onPaginationChange:n,getCoreRowModel:m(),getPaginationRowModel:g()});return(0,y.useEffect)(()=>{c(l.getPageCount())},[l,c]),(0,b.jsxs)(`div`,{className:`flex flex-1 flex-col gap-4`,children:[(0,b.jsxs)(`div`,{className:`space-y-1`,children:[(0,b.jsx)(`h3`,{className:`font-semibold text-lg`,children:i()}),(0,b.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r()})]}),(0,b.jsx)(h,{table:l}),(0,b.jsx)(p,{className:`mt-auto`,table:l})]})}function O(){return(0,b.jsx)(D,{})}var k=O;export{k as component};