1import{u as N,j as e,H as g,L as i,b as o,B as l,a as _}from"./app-czhrZuOt.js";import{A as y}from"./AuthenticatedLayout-6D4-8ZXI.js";import{C as d,d as x,a as v,b}from"./card-ycwGpo2O.js";import{S as n}from"./separator-CM9ztqRx.js";import{A as w}from"./arrow-left-yqzQVBql.js";import{S as u}from"./shopping-cart-DHmX8Lla.js";import{C as S}from"./circle-x-DAly3AKl.js";import{U as p}from"./user-Cx88PRXH.js";import{P as C}from"./package-D49S5_8A.js";import{G as k}from"./globe-B14JyJ6A.js";import{C as P}from"./credit-card-C4J_JGuh.js";import{C as B}from"./calendar-CRJ8keDB.js";import{D}from"./dollar-sign-DqHzwk6G.js";import"./dropdown-menu-T8nPhRxM.js";import"./input-DhKi0PtU.js";import"./tooltip-3gnCrGQ_.js";import"./index-CO3-bHtI.js";import"./panel-left-DywVwufr.js";import"./index-D-VcYgw1.js";import"./index-BsdkFYOj.js";import"./chevron-right-_RgHfVVh.js";import"./check-Bzl7AoUV.js";import"./log-out-BV2MZW-s.js";import"./users-VKYAyUQI.js";import"./building-2-CQaiStI9.js";import"./link-2-CAXTgPYN.js";import"./file-text-Bi2d3tkT.js";import"./mail-DsdayFHQ.js";import"./settings-2-CmYOCYr6.js";import"./qr-code-DEyAAUat.js";import"./WhiteLabelContext-Kdbp7x-_.js";import"./mouse-pointer-click-B2tfKS3S.js";import"./megaphone-DH05MufU.js";import"./target-9uU5Ku0L.js";import"./share-2-lpd8gAKY.js";import"./activity-kIEKR-Ok.js";import"./settings-49ePZpss.js";import"./chart-column-CXVdYvL2.js";import"./languages-CRXfoD92.js";import"./user-plus-BUFA6_Xe.js";import"./plus-pGk13rni.js";import"./LanguageSelector-B1YS7AsG.js";import"./chevron-down-xMu7kuEX.js";import"./FooterSocialLinks-a8x94R2Q.js";import"./ThemeToggle-BE__v9EI.js";import"./bell-e_q56CXD.js";import"./FlashNotification-DC-gGBqa.js";import"./circle-check-BSbw1c6G.js";import"./triangle-alert-BbNR7tvC.js";function Ce(){const c=N().props,t=c.ui??{},s=c.session,r=(a,m)=>new Intl.NumberFormat("en-US",{style:"currency",currency:m}).format(a),h=a=>({completed:"success",processing:"default",pending:"secondary",expired:"destructive",cancelled:"destructive"})[a]||"secondary",j=a=>({paid:"success",unpaid:"warning",refunded:"secondary",failed:"destructive"})[a]||"secondary",f=()=>{confirm(t.confirm_expire??"Are you sure you want to expire this session?")&&_.post(route("admin.central-payment.sessions.expire",s.id),{},{preserveScroll:!0})};return e.jsxs(y,{children:[e.jsx(g,{title:`Session #${s.session_id}`}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(i,{href:route("admin.central-payment.sessions.index"),children:e.jsxs(o,{variant:"ghost",size:"sm",children:[e.jsx(w,{className:"h-4 w-4 mr-2"}),t.back??"Back"]})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-3",children:[e.jsx(u,{className:"h-6 w-6 text-muted-foreground"}),t.checkout_session??"Checkout Session",e.jsxs("span",{className:"font-mono text-lg",children:["#",s.session_id]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t.session_details??"Session Details"})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:s.status!=="expired"&&s.status!=="completed"&&e.jsxs(o,{variant:"destructive",onClick:f,children:[e.jsx(S,{className:"mr-2 h-4 w-4"}),t.expire??"Expire Session"]})})]}),e.jsx(d,{children:e.jsx(x,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:t.status??"Status"}),e.jsx(l,{variant:h(s.status),className:"text-lg px-4 py-2",children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"ml-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:t.payment_status??"Payment Status"}),e.jsx(l,{variant:j(s.payment_status),className:"text-lg px-4 py-2",children:s.payment_status.toUpperCase()})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-3xl font-bold",children:r(s.total_amount,s.currency)}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[t.mode??"Mode",": ",s.mode]})]})]})})}),e.jsxs(d,{children:[e.jsx(v,{children:e.jsx(b,{children:t.session_information??"Session Information"})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(u,{className:"h-3 w-3"}),t.session_id??"Session ID"]}),e.jsx("p",{className:"mt-1 font-mono text-sm",children:s.session_id})]}),s.customer&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(p,{className:"h-3 w-3"}),t.customer??"Customer"]}),e.jsx(i,{href:route("admin.central-payment.customers.show",s.customer.id),className:"mt-1 text-primary hover:underline block",children:s.customer.name||s.customer.email}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.customer.customer_id})]}),s.customer_email&&!s.customer&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(p,{className:"h-3 w-3"}),t.customer_email??"Customer Email"]}),e.jsx("p",{className:"mt-1",children:s.customer_email})]}),s.product&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(C,{className:"h-3 w-3"}),t.product??"Product"]}),e.jsx(i,{href:route("admin.central-payment.products.show",s.product.id),className:"mt-1 text-primary hover:underline block",children:s.product.name})]}),s.connected_site&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(k,{className:"h-3 w-3"}),t.connected_site??"Connected Site"]}),e.jsx(i,{href:route("admin.central-payment.sites.show",s.connected_site.id),className:"mt-1 text-primary hover:underline block",children:s.connected_site.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.connected_site.domain})]}),s.payment_system&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(P,{className:"h-3 w-3"}),t.payment_system??"Payment System"]}),e.jsx("p",{className:"mt-1",children:s.payment_system.name})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-sm font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(B,{className:"h-3 w-3"}),t.created_at??"Created"]}),e.jsx("p",{className:"mt-1",children:new Date(s.created_at).toLocaleStr
1ing()})]}),s.external_reference&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:t.external_reference??"External Reference"}),e.jsx("p",{className:"mt-1 font-mono text-xs",children:s.external_reference})]}),s.gateway_session_id&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:t.gateway_session_id??"Gateway Session ID"}),e.jsx("p",{className:"mt-1 font-mono text-xs",children:s.gateway_session_id})]})]}),e.jsx(n,{}),e.jsxs("div",{children:[e.jsxs("h3",{className:"font-semibold mb-3 flex items-center gap-2",children:[e.jsx(D,{className:"h-4 w-4"}),t.pricing_breakdown??"Pricing Breakdown"]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:t.subtotal??"Subtotal"}),e.jsx("span",{children:r(s.amount,s.currency)})]}),s.tax_amount>0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:t.tax??"Tax"}),e.jsx("span",{children:r(s.tax_amount,s.currency)})]}),s.discount_amount>0&&e.jsxs("div",{className:"flex justify-between text-green-600",children:[e.jsxs("span",{children:[t.discount??"Discount",s.promocode&&` (${s.promocode})`]}),e.jsxs("span",{children:["-",r(s.discount_amount,s.currency)]})]}),e.jsx(n,{}),e.jsxs("div",{className:"flex justify-between font-bold text-lg",children:[e.jsx("span",{children:t.total??"Total"}),e.jsx("span",{children:r(s.total_amount,s.currency)})]})]})]}),s.line_items&&s.line_items.length>0&&e.jsxs(e.Fragment,{children:[e.jsx(n,{}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-3",children:t.line_items??"Line Items"}),e.jsx("pre",{className:"p-3 bg-muted rounded-md text-xs overflow-x-auto",children:JSON.stringify(s.line_items,null,2)})]})]}),(s.success_url||s.cancel_url)&&e.jsxs(e.Fragment,{children:[e.jsx(n,{}),e.jsxs("div",{className:"space-y-2",children:[s.success_url&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:t.success_url??"Success URL"}),e.jsx("p",{className:"mt-1 text-xs break-all text-blue-600",children:s.success_url})]}),s.cancel_url&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:t.cancel_url??"Cancel URL"}),e.jsx("p",{className:"mt-1 text-xs break-all text-blue-600",children:s.cancel_url})]})]})]})]})]})]})]})}export{Ce 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.