1import{u as T,r as o,b as S,j as e,H as P,L as d}from"./app-DP13319Q.js";import{F as a,a_ as $,j as x,k as y,aF as C,ai as L,at as j,az as l,P as F,au as D,av as R,ah as A}from"./index-CtyZ6W6U.js";import{D as E}from"./DraggableMenu-Bk7Spryo.js";import{M as g}from"./react-tooltip.min-DW3XhwOj.js";/* empty css */import"./index-DQkUn08L.js";function Y(){const{auth:w,template:M,transfers:r}=T().props,[n,h]=o.useState(!1),[N,V]=o.useState(!0),[u,b]=o.useState(r.current_page||1),[p,v]=o.useState(r.data),[m,f]=o.useState(r.current_page<r.last_page),k=o.useCallback(t=>new Date(t).toLocaleDateString("en-US",{weekday:"short",day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}),[]),i=o.useCallback(t=>t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}),[]),_=o.useCallback(async()=>{if(!(!m||n)){h(!0);try{const t=u+1,s=await S.get("/refund-transfers/load-more",{params:{page:t}});s.data.data&&s.data.data.length>0?(v(c=>[...c,...s.data.data]),b(t),f(s.data.current_page<s.data.last_page)):f(!1)}catch(t){console.error("Error loading more transfers:",t)}finally{h(!1)}}},[u,m,n]);return e.jsxs(e.Fragment,{children:[e.jsxs(P,{children:[e.jsx("title",{children:"Refunded Domain Transfers - Your Refunded Handle Transactions"}),e.jsx("meta",{name:"description",content:"View your refunded domain transfers"}),e.jsx("style",{children:` 2 .react-tooltip { 3 z-index: 99999 !important; 4 opacity: 1 !important; 5 font-size: 12px; 6 padding: 4px 8px; 7 } 8 `})]}),e.jsx(g,{id:"action-tooltip"}),e.jsx(g,{id:"form-tooltip"}),e.jsx(E,{auth:w}),e.jsx("main",{className:"relative flex justify-end p-4 min-h-screen overflow-hidden",children:N&&e.jsx("div",{className:"relative mt-4 mx-auto bottom-4 z-50 backdrop-blur-sm p-4 rounded-xl border border-white-700 overflow-y-auto shadow-2xl w-full max-w-6xl",children:e.jsxs("div",{className:"bg-gray-800/80 border border-gray-700 rounded-lg p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(a,{icon:$,className:"text-yellow-400 text-2xl"}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Refunded Domain Transfers"})]}),e.jsxs(d,{href:"/marketplace",className:"flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-4 rounded-md hover:bg-yellow-500 transition-colors","data-tooltip-id":"action-tooltip","data-tooltip-content":"Go to the marketplace to buy or sell domains",children:[e.jsx(a,{icon:x}),"Marketplace"]})]}),n&&p.length===0?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx(a,{icon:y,className:"text-yellow-400 text-4xl animate-spin"})}):p.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(a,{icon:C,className:"text-gray-400 text-5xl mb-4"}),e.jsx("h3",{className:"text-xl font-medium text-gray-300 mb-2",children:"No refunded transfers"}),e.jsx("p",{className:"text-gray-400 mb-6",children:"Your refunded domain transfers will appear here"}),e.jsxs(d,{href:"/marketplace",className:"inline-flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-6 rounded-md hover:bg-yellow-500 transition-colors","data-tooltip-id":"action-tooltip","data-tooltip-content":"Visit the Marketplace",children:[e.jsx(a,{icon:x}),"Visit Marketplace"]})]}):e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs("table",{className:"min-w-full divide-y divide-gray-700",children:[e.jsx("thead",{className:"bg-gray-900/50",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The domain or handle that was part of the transaction",children:"Domain/Handle"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"Your role in this transaction (Seller or Buyer)",children:"Role"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"Link to the transaction invoice",children:"Invoice"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The initial agreed price for the transfer",children:"Original Amount"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The portion of the buyer's payment held in escrow (90% of original amount)",children:"Buyer Payment Hold (100%)"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The fee charged to the seller for rejecting the offer (10% of original amount)",children:"Rejection Fee (10%)"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The amount paid to the buyer as compensation for the rejection (10% of original amount)",children:"Buyer Compensation (10%)"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The total penalty applied to the seller (Rejection Fee + Buyer Compensation, 20% total)",children:"Total Penalty (20%)"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The total amount refunded to the buyer (Original Payment Hold + Compensation, 110% total)",children:"Total Refund (110%)"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The other user involved in this transfer",children:"Other Party"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The final status of the transfer",children:"Status"}),e.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-yellow-400 uppercase tracking-wider","data-tooltip-id":"form-tooltip","data-tooltip-content":"The date and time the refund was processed",children:"Processed At"})]})}),e.jsx("tbody",{className:"bg-gray-800/50 divide-y divide-gray-700",children:p.map(t=>{var s,c;return e.jsxs("tr",{className:"hover:bg-gray-700/50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:t.domain.type==="custom"?L:x,className:`mr-2 ${t.domain.type==="custom"?"text-blue-400":"text-green-400"}`}),e.jsx("a",{href:t.domain.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-white hover:underline","data-tooltip-id":"action-tooltip","data-tooltip-content":"View the domain/handle",children:t.domain.url})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${t.is_seller?"bg-purple-500 text-white":"bg-blue-500 text-white"}`,"data-tooltip-id":"form-tooltip","data-tooltip-content":`You are the ${t.is_seller?"Seller":"Buyer"}`,children:t.is_seller?"Seller":"Buyer"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.is_seller?(s=t.invoice)!=null&&s.number?e.jsxs(d,{href:`/refundinvoiceseller/${t.invoice.number}`,target:"_blank",className:"flex items-center text-blue-400 hover:underline","data-tooltip-id":"action-tooltip","data-tooltip-content":"View Invoice",children:[e.jsx(a,{icon:j,className:"mr-2"}),t.invoice.number]}):e.jsx("span",{className:"text-gray-400",children:"N/A"}):(c=t.invoice)!=null&&c.number?e.jsxs(d,{href:`/refundinvoicebuyer/${t.invoice.number}`,target:"_blank",className:"flex items-center text-blue-400 hover:underline","data-tooltip-id":"action-tooltip","data-tooltip-content":"View Invoice",children:[e.jsx(a,{icon:j,className:"mr-2"}),t.invoice.number]}):e.jsx("span",{className:"text-gray-400",children:"N/A"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:l,className:"text-yellow-400 mr-2"}),e.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",i(t.original_amount)]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:l,className:"text-green-400 mr-2"}),e.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",i(t.buyer_payment_hold)]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:l,className:"text-orange-400 mr-2"}),e.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",i(t.reject_service_commission)]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:l,className:"text-pink-400 mr-2"}),e.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",i(t.reject_buyer_commission)]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:l,className:"text-purple-400 mr-2"}),e.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",i(t.total_penalty)]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(a,{icon:l,className:"text-teal-400 mr-2"}),e.jsxs("span",{className:"text-sm font-medium text-white",children:["EZ$",i(t.refund_amount)]})]})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.other_party?e.jsxs("div",{className:"flex items-center","data-tooltip-id":"form-tooltip","data-tooltip-content":t.other_party.email,children:[e.jsx(a,{icon:F,className:"text-gray-400 mr-2"}),e.jsx("span",{className:"text-sm text-gray-300",children:t.other_party.email})]}):e.jsx("span",{className:"text-sm text-gray-400",children:"Unknown"})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`text-sm ${t.status==="refunded"?"text-green-400":"text-yellow-400"} capitalize`,children:t.status})}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center","data-tooltip-id":"form-tooltip","data-tooltip-content":`Refund processed at: ${t.processed_at}`,children:[e.jsx(a,{icon:D,className:"text-blue-400 mr-2"}),e.jsx("span",{className:"text-sm text-gray-300",children:k(t.processed_at)})]})})]},t.id)})})]}),e.jsxs("div",{className:"mt-6 flex flex-col items-center space-y-4",children:[e.jsxs("button",{className:"flex items-center gap-2 bg-gray-700 text-white px-4 py-2 rounded-md hover:bg-gray-600 transition-colors",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),"data-tooltip-id":"action-tooltip","data-tooltip-content":"Scroll to the top of the page",children:[e.jsx(a,{icon:R}),"Back to Top"]}),m&&e.jsx("button",{onClick:_,disabled:n,className:"flex items-center gap-2 bg-yellow-400 text-black font-bold py-2 px-6 rounded-md hover:bg-yellow-500 transition-colors disabled:opacity-50","data-tooltip-id":"action-tooltip","data-tooltip-content":"Load more refunded transfers",children:n?e.jsxs(e.Fragment,{children:[e.jsx(a,{icon:y,className:"animate-spin"}),"Loading..."]}):e.jsxs(e.Fragment,{children:[e.jsx(a,{icon:A}),"Load More"]})})]})]})]})})})]})}export{Y 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.