import{u as r,j as e,H as c,c as m}from"./app-C796L9fe.js";import{C as o}from"./credit-card-DNe8k50a.js";import{F as x}from"./file-text-C8X4wwfe.js";import{C as d}from"./circle-check-big-hYXNtPks.js";import{C as h}from"./circle-x-D4WIFgEF.js";import{A as u}from"./arrow-left-CQNYQhNa.js";import"./createLucideIcon-C4f7Jwm9.js";function v({order:t}){const{site_settings:i}=r().props,n=i?.store_name||"E-Shop",a=s=>new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",minimumFractionDigits:0}).format(s),l=s=>{m.post(route("payment.mock-process",{order:t.id}),{status:s})};return e.jsxs("div",{className:"min-h-screen bg-slate-50 flex items-center justify-center p-4 sm:p-6 font-sans text-slate-800",children:[e.jsx(c,{title:`Simulasi Pembayaran Midtrans - ${n}`}),e.jsxs("div",{className:"max-w-md w-full bg-white rounded-xl border border-slate-200 shadow-xl overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-emerald-800 to-emerald-600 p-6 text-white text-center relative",children:[e.jsx("div",{className:"absolute inset-0 opacity-10 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-white via-transparent to-transparent"}),e.jsx(o,{size:40,className:"mx-auto mb-2 opacity-90 animate-pulse"}),e.jsx("h2",{className:"text-xl font-bold tracking-wide",children:"SIMULASI PAYMENT GATEWAY"}),e.jsx("p",{className:"text-xs text-emerald-100 mt-1",children:"Gunakan halaman ini untuk mensimulasikan transaksi"})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"bg-slate-50 p-4 rounded-xl border border-slate-100 space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center text-xs text-slate-400",children:[e.jsxs("span",{className:"flex items-center",children:[e.jsx(x,{size:12,className:"mr-1"})," Invoice"]}),e.jsx("span",{className:"font-mono font-bold text-slate-700",children:t.invoice_number})]}),e.jsx("hr",{className:"border-slate-150"}),e.jsx("div",{className:"space-y-2 max-h-40 overflow-y-auto",children:t.items.map(s=>e.jsxs("div",{className:"flex justify-between text-xs text-slate-650",children:[e.jsxs("span",{className:"truncate max-w-[70%]",children:[s.product.name," (x",s.qty,")"]}),e.jsx("span",{className:"font-semibold",children:a(s.price*s.qty)})]},s.id))}),e.jsx("hr",{className:"border-slate-150"}),t.discount_amount>0&&e.jsxs("div",{className:"flex justify-between text-xs text-emerald-600 font-semibold",children:[e.jsx("span",{children:"Diskon"}),e.jsxs("span",{children:["-",a(t.discount_amount)]})]}),e.jsxs("div",{className:"flex justify-between text-xs text-slate-650",children:[e.jsx("span",{children:"Ongkos Kirim"}),e.jsx("span",{children:a(t.shipping_cost)})]}),e.jsx("hr",{className:"border-slate-150"}),e.jsxs("div",{className:"flex justify-between items-center text-sm font-black text-slate-800",children:[e.jsx("span",{children:"Total Pembayaran"}),e.jsx("span",{className:"text-lg text-emerald-600",children:a(t.total)})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("button",{onClick:()=>l("settlement"),className:"w-full py-3.5 bg-emerald-600 hover:bg-emerald-700 text-white font-bold rounded-xl text-sm transition shadow-md shadow-emerald-100 flex items-center justify-center",children:[e.jsx(d,{size:18,className:"mr-2"}),"Simulasi Bayar Sukses"]}),e.jsxs("button",{onClick:()=>l("cancel"),className:"w-full py-3.5 bg-rose-600 hover:bg-rose-700 text-white font-bold rounded-xl text-sm transition shadow-md shadow-rose-100 flex items-center justify-center",children:[e.jsx(h,{size:18,className:"mr-2"}),"Simulasi Batalkan Transaksi"]})]}),e.jsx("div",{className:"text-center pt-2",children:e.jsxs("button",{onClick:()=>window.history.back(),className:"text-xs text-slate-400 hover:text-slate-600 inline-flex items-center",children:[e.jsx(u,{size:12,className:"mr-1"})," Kembali ke Checkout"]})})]})]})]})}export{v as default};
