1import{g as f,j as e,L as a}from"./react-vendor-DBxhyi1n.js";import{u as h,T as p,aM as b,j as u,b as y}from"./index-CSyO7D9J.js";import{P as c}from"./plus-BfUDwk7-.js";const t={BG_CARD:"#ffffff",BG_CARD2:"#ffffff",LINE:"rgba(15, 23, 42, .07)",LINE_GOLD:"rgba(37, 99, 235,.18)",GOLD:"#2563eb",GOLD2:"#1d4ed8",TEXT:"#0f172a",MUTED:"#64748b",DIMMED:"#94a3b8"},m={open:{bg:"rgba(34,197,94,.12)",color:"#4ade80"},in_progress:{bg:"rgba(59,130,246,.12)",color:"#60a5fa"},waiting:{bg:"rgba(245,158,11,.12)",color:"#fbbf24"},resolved:{bg:"rgba(74,82,96,.35)",color:t.MUTED},closed:{bg:"rgba(74,82,96,.35)",color:t.DIMMED}},D={low:{bg:"rgba(74,82,96,.35)",color:t.MUTED},normal:{bg:"rgba(59,130,246,.12)",color:"#60a5fa"},high:{bg:"rgba(245,158,11,.12)",color:"#fbbf24"},urgent:{bg:"rgba(239,68,68,.12)",color:"#f87171"}};function x({label:n,colors:r}){return e.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:"9999px",fontSize:"11px",fontWeight:600,background:r.bg,color:r.color},children:n})}function M(){const{t:n}=h(),{data:r=[],isLoading:d}=f({queryKey:["my-tickets"],queryFn:()=>y.get("/tickets/my")}),g=o=>{const l=Date.now()-new Date(o).getTime(),s=Math.floor(l/6e4);if(s<60)return`${s}${n("common.minutesAgo")}`;const i=Math.floor(s/60);return i<24?`${i}${n("common.hoursAgo")}`:new Date(o).toLocaleDateString()};return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px",maxWidth:"896px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{children:[e.jsxs("h1",{style:{fontSize:"24px",fontWeight:700,color:t.TEXT,margin:0,display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx(p,{style:{height:"24px",width:"24px",color:t.GOLD}}),n("tickets.title")]}),e.jsx("p",{style:{fontSize:"14px",color:t.MUTED,marginTop:"4px"},children:n("tickets.subtitle")})]}),e.jsxs(a,{to:"/support",style:{display:"inline-flex",alignItems:"center",gap:"8px",borderRadius:"9999px",padding:"8px 18px",fontSize:"14px",fontWeight:600,textDecoration:"none",background:`linear-gradient(135deg, ${t.GOLD}, ${t.GOLD2})`,color:"#f1f5fb",transition:"opacity 0.2s"},children:[e.jsx(c,{style:{height:"16px",width:"16px"}}),n("tickets.newTicket")]})]}),d?e.jsx("div",{style:{fontSize:"14px",color:t.MUTED,padding:"32px",textAlign:"center"},children:n("tickets.loading")}):r.length===0?e.jsxs("div",{style:{borderRadius:"12px",border:`1px solid ${t.LINE_GOLD}`,background:t.BG_CARD,padding:"48px 24px",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"12px"},children:[e.jsx(p,{style:{height:"40px",width:"40px",color:t.DIMMED}}),e.jsx("p",{style:{fontWeight:600,color:t.TEXT,margin:0},children:n("tickets.noTickets")}),e.jsx("p",{style:{fontSize:"14px",color:t.MUTED},children:n("tickets.noTicketsDesc")}),e.jsxs(a,{to:"/support",style:{display:"inline-flex",alignItems:"center",gap:"8px",borderRadius:"9999px",padding:"8px 18px",fontSize:"14px",fontWeight:600,textDecoration:"none",background:`linear-gradient(135deg, ${t.GOLD}, ${t.GOLD2})`,color:"#f1f5fb",marginTop:"8px"},children:[e.jsx(c,{style:{height:"16px",width:"16px"}}),n("tickets.openFirst")]})]}):e.jsx("div",{style:{borderRadius:"12px",border:`1px solid ${t.LINE_GOLD}`,background:t.BG_CARD,overflow:"hidden"},children:r.map((o,l)=>{var s;return e.jsxs(a,{to:`/account/tickets/${o.id}`,style:{display:"flex",alignItems:"center",gap:"16px",padding:"16px 20px",textDecoration:"none",borderBottom:l<r.length-1?`1px solid ${t.LINE}`:"none",transition:"background 0.15s"},onMouseEnter:i=>i.currentTarget.style.background="rgba(15, 23, 42, .025)",onMouseLeave:i=>i.currentTarget.style.background="transparent",children:[e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px",flexWrap:"wrap"},children:[e.jsxs("span",{style:{fontFamily:"monospace",fontSize:"12px",color:t.DIMMED},children:["#",o.ticket_number]}),e.jsx(x,{label:n(`tickets.status.${o.status}`)||o.status.replace("_"," "),colors:m[o.status]??{bg:"rgba(74,82,96,.35)",color:t.MUTED}}
1),e.jsx(x,{label:n(`tickets.priority.${o.priority}`)||o.priority,colors:D[o.priority]??{bg:"rgba(74,82,96,.35)",color:t.MUTED}}),o.plugin_name&&e.jsx("span",{style:{fontSize:"12px",color:t.GOLD,fontWeight:500},children:o.plugin_name})]}),e.jsx("p",{style:{fontWeight:600,color:t.TEXT,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.subject}),e.jsxs("p",{style:{fontSize:"12px",color:t.MUTED,marginTop:"2px"},children:[(s=o.category)==null?void 0:s.replace("-"," ")," · ",n("tickets.updatedAgo")," ",g(o.updated_at)]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:[o.reply_count>0&&e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"12px",color:t.MUTED},children:[e.jsx(b,{style:{height:"14px",width:"14px"}}),o.reply_count]}),e.jsx(u,{style:{height:"16px",width:"16px",color:t.DIMMED}})]})]},o.id)})})]})}export{M 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.