import{$a as e,Cd as t,Dd as n,Ja as r,Qa as i,Xa as a,Ya as o,Za as s,eo as c,qa as l,wd as u}from"./messages-Bhh1Viqz.js";import{r as d}from"./route-DVUwa8Pp.js";import{f,n as p,p as m,r as h,v as g}from"./data-table-ur1C4EN0.js";import{t as _}from"./badge-zrw4vTsO.js";import{t as v}from"./use-table-url-state-D-ZLKfDn.js";var y=n(u(),1),b=t(),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:r()},{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:l()}];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:r}=v({search:E.useSearch(),navigate:E.useNavigate(),pagination:{defaultPage:1,defaultPageSize:10}}),l=f({data:x,columns:(0,y.useMemo)(()=>[{accessorKey:`name`,header:i(),cell:({row:e})=>(0,b.jsx)(`span`,{className:`font-medium`,children:e.original.name})},{accessorKey:`entries`,header:s(),cell:({row:e})=>(0,b.jsx)(w,{item:e.original})},{accessorKey:`requestFields`,header:a(),cell:({row:e})=>(0,b.jsx)(T,{fields:e.original.requestFields})},{accessorKey:`callbackNote`,header:o(),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)(()=>{r(l.getPageCount())},[l,r]),(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:c()}),(0,b.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e()})]}),(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};