PageSourceSearch

https://app.guardianpro.cloud/assets/SupportPage-B0t3kljh.js

js guardianpro.cloud collected 2026-10-03 21:16:20 UTC 24,933 bytes, 1 lines download raw bytes

1import{r as t,j as e,k as B}from"./vendor-BFXU7DOE.js";import{p as P,u as O,aX as S,F as q,B as b,X as Q,m as M,aF as Y,aA as _,h as W,av as K,S as z,ad as X,i as J,I as ee,a2 as te,aW as Z,ab as I,aE as ae,aP as se,d as re,a7 as le,e as V,L as ne,T as ce,P as ie,Q as oe}from"./index-0a0uir_3.js";import{u as de,a as ue,c as k}from"./ui-B_QsM55A.js";import{t as me,s as L}from"./support.queries-B27nE602.js";import{D as xe,a as he,c as pe}from"./dialog--gr6qb0w.js";import{S as ge,a as fe,b as be,c as ve,d as je}from"./select-Bz71UlHT.js";import{I as Ne}from"./input-tkUwFhSJ.js";import{s as ye}from"./FileText.es-CuCRd6MT.js";import{s as D}from"./Lightbulb.es-CxWh2rrB.js";import{c as Ae}from"./Link.es-DYaybtOB.js";import{n as we}from"./Tag.es-CkaBL7Ha.js";import{T as R,a as F,C as He,f as Ee}from"./support.constants-JJXbhS1K.js";import{n as Le}from"./Clock.es-B1wluXSG.js";import"./radix-BmG-mZpu.js";const ke=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M140,88a16,16,0,1,1,16,16A16,16,0,0,1,140,88ZM100,72a16,16,0,1,0,16,16A16,16,0,0,0,100,72Zm120,72a91.84,91.84,0,0,1-2.34,20.64L236.81,173a12,12,0,0,1-9.62,22l-18-7.85a92,92,0,0,1-162.46,0l-18,7.85a12,12,0,1,1-9.62-22l19.15-8.36A91.84,91.84,0,0,1,36,144v-4H16a12,12,0,0,1,0-24H36v-4a91.84,91.84,0,0,1,2.34-20.64L19.19,83a12,12,0,0,1,9.62-22l18,7.85a92,92,0,0,1,162.46,0l18-7.85a12,12,0,1,1,9.62,22l-19.15,8.36A91.84,91.84,0,0,1,220,112v4h20a12,12,0,0,1,0,24H220ZM60,116H196v-4a68,68,0,0,0-136,0Zm56,94.92V140H60v4A68.1,68.1,0,0,0,116,210.92ZM196,144v-4H140v70.92A68.1,68.1,0,0,0,196,144Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,128v16a80,80,0,0,1-160,0V128Z",opacity:"0.2"}),t.createElement("path",{d:"M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M168,92a12,12,0,1,1-12-12A12,12,0,0,1,168,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216Zm-80,0a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0Zm64-32a72,72,0,0,0-144,0v8H200Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M146,92a10,10,0,1,1,10,10A10,10,0,0,1,146,92ZM100,82a10,10,0,1,0,10,10A10,10,0,0,0,100,82Zm146,46a6,6,0,0,1-6,6H214v10a85.88,85.88,0,0,1-3.45,24.08L234.4,178.5a6,6,0,0,1-4.8,11l-23.23-10.15a86,86,0,0,1-156.74,0L26.4,189.5a6,6,0,1,1-4.8-11l23.85-10.42A85.88,85.88,0,0,1,42,144V134H16a6,6,0,0,1,0-12H42V112a85.88,85.88,0,0,1,3.45-24.08L21.6,77.5a6,6,0,0,1,4.8-11L49.63,76.65a86,86,0,0,1,156.74,0L229.6,66.5a6,6,0,1,1,4.8,11L210.55,87.92A85.88,85.88,0,0,1,214,112v10h26A6,6,0,0,1,246,128ZM54,122H202V112a74,74,0,0,0-148,0Zm68,95.74V134H54v10A74.09,74.09,0,0,0,122,217.74ZM202,134H134v83.74A74.09,74.09,0,0,0,202,144Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M148,92a8,8,0,1,1,8,8A8,8,0,0,1,148,92Zm-48-8a8,8,0,1,0,8,8A8,8,0,0,0,100,84Zm144,44a4,4,0,0,1-4,4H212v12a83.64,83.64,0,0,1-3.87,25.2l25.47,11.13A4,4,0,0,1,232,188a4.09,4.09,0,0,1-1.6-.33l-25-10.95a84,84,0,0,1-154.72,0l-25,10.95A4.09,4.09,0,0,1,24,188a4,4,0,0,1-1.6-7.67L47.87,169.2A83.64,83.64,0,0,1,44,144V132H16a4,4,0,0,1,0-8H44V112a83.64,83.64,0,0,1,3.87-25.2L22.4,75.67a4,4,0,0,1,3.2-7.34l25,11a84,84,0,0,1,154.72,0l25-11a4,4,0,1,1,3.2,7.34L208.13,86.8A83.64,83.64,0,0,1,212,112v12h28A4,4,0,0,1,244,128ZM52,124H204V112a76,76,0,0,0-152,0Zm72,95.89V132H52v12A76.09,76.09,0,0,0,124,219.89ZM204,132H132v87.89A76.09,76.09,0,0,0,204,144Z"}))]]),Ce=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,24v92H179.31a19.86,19.86,0,0,0-14.14,5.86L147,168H109L90.83,149.86A19.86,19.86,0,0,0,76.69,144H52V52ZM52,204V168H75l18.14,18.14A19.86,19.86,0,0,0,107.31,192h41.38a19.86,19.86,0,0,0,14.14-5.86L181,168h23v36Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216,48V160H179.31a8,8,0,0,0-5.66,2.34l-19.31,19.32a8,8,0,0,1-5.66,2.34H107.31a8,8,0,0,1-5.66-2.34L82.34,162.34A8,8,0,0,0,76.68,160H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),t.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.68A15.89,15.89,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V168H76.69L96,187.32A15.89,15.89,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H208a2,2,0,0,1,2,2V154H179.31a13.94,13.94,0,0,0-9.9,4.1L150.1,177.41a2,2,0,0,1-1.41.59H107.31a2,2,0,0,1-1.41-.58L86.59,158.1a13.94,13.94,0,0,0-9.9-4.1H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V166H76.69a2,2,0,0,1,1.41.58L97.41,185.9a13.94,13.94,0,0,0,9.9,4.1h41.38a13.94,13.94,0,0,0,9.9-4.1l19.31-19.31a2,2,0,0,1,1.41-.59H210v42A2,2,0,0,1,208,210Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H208a4,4,0,0,1,4,4V156H179.31a12,12,0,0,0-8.48,3.51l-19.32,19.32a4,4,0,0,1-2.82,1.17H107.31
1a4,4,0,0,1-2.82-1.17L85.17,159.51A12,12,0,0,0,76.69,156H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V164H76.69a4,4,0,0,1,2.82,1.17l19.32,19.32a12,12,0,0,0,8.48,3.51h41.38a12,12,0,0,0,8.48-3.51l19.32-19.32a4,4,0,0,1,2.82-1.17H212v44A4,4,0,0,1,208,212Z"}))]]),G=t.forwardRef((n,r)=>t.createElement(P,{ref:r,...n,weights:ke}));G.displayName="BugIcon";const Te=G,$=t.forwardRef((n,r)=>t.createElement(P,{ref:r,...n,weights:Ce}));$.displayName="TrayIcon";const Me=$;function Se(n={}){var p,y,A,N;const{params:r={}}=n,d=de(),{currentAccount:s,hasFeature:u}=O(),c=(s==null?void 0:s.accountId)??"",x=t.useRef(c);t.useEffect(()=>{x.current&&x.current!==c&&d.removeQueries({queryKey:S.all(x.current)}),x.current=c},[c,d]);const o=ue({...me(c,r),enabled:!!c&&u(q.supportTickets)}),g=t.useCallback(()=>{d.invalidateQueries({queryKey:S.tickets.all(c)})},[d,c]),h=k({mutationFn:a=>L.createTicket(a),onSuccess:g}),v=k({mutationFn:({ticketId:a,data:i})=>L.updateTicket(a,i),onSuccess:g}),f=k({mutationFn:a=>L.closeTicket(a),onSuccess:g}),j=k({mutationFn:a=>L.reopenTicket(a),onSuccess:g}),w=t.useCallback(async()=>{await o.refetch()},[o]);return{tickets:((p=o.data)==null?void 0:p.tickets)??[],count:((y=o.data)==null?void 0:y.count)??0,nextToken:(A=o.data)==null?void 0:A.nextToken,loading:o.isLoading,error:((N=o.error)==null?void 0:N.message)??null,refetch:w,createTicket:async a=>(await h.mutateAsync(a)).ticket,updateTicket:async(a,i)=>(await v.mutateAsync({ticketId:a,data:i})).ticket,closeTicket:async a=>(await f.mutateAsync(a)).ticket,reopenTicket:async a=>(await j.mutateAsync(a)).ticket,isCreating:h.isPending,isUpdating:v.isPending||f.isPending||j.isPending}}const Ze=[{value:"GENERAL_INQUIRY",label:"General Inquiry",icon:e.jsx(_,{className:"w-4 h-4"}),color:"text-gray-500"},{value:"SECURITY_FINDINGS",label:"Security Findings",icon:e.jsx(W,{className:"w-4 h-4"}),color:"text-status-red"},{value:"REMEDIATION",label:"Remediation",icon:e.jsx(K,{className:"w-4 h-4"}),color:"text-status-orange"},{value:"COST_ANALYSIS",label:"Cost Analysis",icon:e.jsx(z,{className:"w-4 h-4"}),color:"text-status-green"},{value:"ACCOUNT_MANAGEMENT",label:"Account Management",icon:e.jsx(X,{className:"w-4 h-4"}),color:"text-status-blue"},{value:"BILLING_SUBSCRIPTION",label:"Billing & Subscription",icon:e.jsx(J,{className:"w-4 h-4"}),color:"text-brand"},{value:"PLATFORM_BUG",label:"Platform Bug",icon:e.jsx(Te,{className:"w-4 h-4"}),color:"text-status-yellow"},{value:"FEATURE_REQUEST",label:"Feature Request",icon:e.jsx(D,{className:"w-4 h-4"}),color:"text-status-yellow"},{value:"COMPLIANCE",label:"Compliance",icon:e.jsx(ee,{className:"w-4 h-4"}),color:"text-status-blue"},{value:"WIZARD_DEPLOYMENT",label:"Wizard Deployment",icon:e.jsx(te,{className:"w-4 h-4"}),color:"text-brand"}],Ie=({isOpen:n,onClose:r,onSubmit:d,isSubmitting:s})=>{const{currentAccount:u}=O(),[c,x]=t.useState(""),[o,g]=t.useState(""),[h,v]=t.useState("GENERAL_INQUIRY"),[f,j]=t.useState(!1),[w,p]=t.useState(null),y=()=>{x(""),g(""),v("GENERAL_INQUIRY"),j(!1),p(null)},A=async a=>{var i,m;if(a.preventDefault(),p(null),!c.trim()||c.trim().length<5){p("Subject must be at least 5 characters");return}if(!o.trim()||o.trim().length<10){p("Description must be at least 10 characters");return}try{await d({subject:c.trim(),description:o.trim(),category:h,accountId:f?u==null?void 0:u.accountId:void 0}),y(),r()}catch(H){const E=H,C=(m=(i=E==null?void 0:E.response)==null?void 0:i.data)==null?void 0:m.message;p(C||(H instanceof Error?H.message:"Failed to create ticket"))}},N=()=>{s||(y(),r())};return e.jsx(xe,{open:n,onOpenChange:N,children:e.jsxs(he,{hideCloseButton:!0,className:"max-w-2xl p-0",children:[e.jsx(pe,{className:"sr-only",children:"Create Support Ticket"}),e.jsxs("div",{className:"w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"relative flex items-center justify-between px-6 py-5 border-b border-edge bg-linear-to-r from-brand/5 to-transparent overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-brand/5 rounded-full blur-3xl pointer-events-none"}),e.jsxs("div",{className:"relative flex items-center gap-3",children:[e.jsx("div",{className:"w-9 h-9 bg-brand-soft rounded-xl flex items-center justify-center",children:e.jsx(ye,{className:"w-5 h-5 text-brand"})}),e.jsx("h2",{className:"text-lg font-bold text-fg",children:"Create Support Ticket"})]}),e.jsx(b,{variant:"ghost",size:"icon",onClick:N,disabled:s,"aria-label":"Close",className:"relative",children:e.jsx(Q,{className:"w-5 h-5"})})]}),e.jsxs("form",{onSubmit:A,className:"p-6 space-y-5",children:[w&&e.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 bg-red-500/10 border border-red-500/20 rounded-xl",children:[e.jsx(M,{className:"w-4 h-4 text-status-red shrink-0"}),e.jsx("span",{className:"text-sm text-status-red",children:w})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"ticket-subject",className:"flex items-center gap-2 text-sm font-semibold text-fg-muted mb-2",children:"Subject"}),e.jsx(Ne,{id:"ticket-subject",type:"text",value:c,onChange:a=>x(a.target.value),placeholder:"Brief summary of your issue",className:"px-4 py-3 rounded-xl",maxLength:200,disabled:s})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm font-semibold text-fg-muted mb-2",children:[e.jsx(we,{className:"w-3.5 h-3.5 text-fg-subtle"}),"Category"]}),e.jsxs(ge,{value:h,onValueChange:a=>v(a),disabled:s,children:[e.jsx(fe,{className:"w-full px-4 py-3 h-auto rounded-xl",children:e.jsx(be,{})}),e.jsx(ve,{children:Ze.map(a=>e.jsx(je,{value:a.value,children:e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx("span",{className:a.color,children:a.icon}),a.label]})},a.value))})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"ticket-description",className:"flex items-center gap-2 text-sm font-semibold text-fg-muted mb-2",children:"Description"}),e.jsx(Y,{id:"ticket-description",value:o,onChange:a=>g(a.target.value),placeholder:"Describe your issue in detail. Include steps to reproduce if applicable.",rows:5,className:"px-4 py-3 rounded-xl leading-relaxed",disabled:s})]}),u&&e.jsxs("label",{className:"flex items-center gap-3 px-4 py-3 bg-surface-elevated border border-edge rounded-xl cursor-pointer hover:bg-surface-card transition-colors duration-200 group",children:[e.jsx("input",{type:"checkbox",checked:f,onChange:a=>j(a.target.checked),className:"w-4 h-4 rounded bg-muted border border-edge text-brand focus:ring-brand/50 focus:ring-offset-0",disabled:s}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[e.jsx(Ae,{className:"w-3.5 h-3.5 text-gray-500"}),"Attach current account",e.jsx("span",{className:"text-xs text-gray-500 font-mono bg-muted px-2 py-0.5 rounded-md",children:u.accountId})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-3 border-t border-edge-subtle",children:[e.jsx(b,{type:"button",variant:"ghost",onClick:N,disabled:s,children:"Cancel"}),e.jsx(b,{type:"submit",disabled:s||!c.trim()||!o.trim(),children:s?"Creating...":"Create Ticket"})]})]})]})]})})},Ve=({ticket:n,onClick:r})=>{const d=R[n.status]??R.OPEN,s=F[n.priority]??F.P3,u=He[n.category]||n.category;return e.jsx(b,{variant:"ghost",onClick:r,className:V("w-full justify-start text-left h-auto bg-surface-elevated hover:bg-surface-card rounded-xl border border-edge border-l-4 p-4 transition-all duration-300 hover:border-edge-strong hover:-translate-y-0.5 hover:shadow-lg hover:shadow-black/20 group",s.border),children:e.jsx("div",{className:"flex items-start gap-3",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-sm font-semibold text-fg truncate group-hover:text-brand transition-colors duration-200",children:n.subject}),e.jsx(ne,{className:"w-4 h-4 text-gray-500 group-hover:text-brand transition-all duration-200 shrink-0 opacity-0 group-hover:opacity-100 -translate-x-1 group-hover:translate-x-0"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(ce,{children:[e.jsx(ie,{asChild:!0,children:e.jsx("span",{className:V("inline-flex items-center px-2 py-0.5 rounded-full text-xs font-semibold border",d.badgeBg,d.color),children:d.label})}),e.jsx(oe,{children:d.tooltip})]}),e.jsx("span",{className:"text-xs font-medium text-gray-500 bg-surface-elevated px-2 py-0.5 rounded-full",children:n.priority}),e.jsx("span",{className:"text-xs text-gray-500",children:u}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-gray-500",children:[e.jsx(_,{className:"w-3 h-3"}),n.messageCount]}),e.jsx("span",{className:"text-xs text-gray-500",children:Ee(n.updatedAt)})]})]})})})},Ke=()=>{const n=B(),[r,d]=t.useState(""),[s,u]=t.useState(""),[c,x]=t.useState(!1),[o,g]=t.useState([]),[h,v]=t.useState(),[f,j]=t.useState(!1),{tickets:w,nextToken:p,loading:y,error:A,createTicket:N,isCreating:a}=Se({params:{...r?{status:r}:{},...s?{priority:s}:{}}});t.useEffect(()=>{g([]),v(p)},[p,r,s]);const i=[...w,...o],m=!!h,H=t.useCallback(async()=>
1{if(!(!h||f)){j(!0);try{const l=await L.getTickets({...r?{status:r}:{},...s?{priority:s}:{},nextToken:h});g(T=>[...T,...l.tickets]),v(l.nextToken)}finally{j(!1)}}},[h,f,r,s]),E=i.filter(l=>!["CLOSED","CANCELLED","RESOLVED"].includes(l.status)).length,C=i.filter(l=>l.status==="WAITING_ON_CUSTOMER").length,U=i.filter(l=>l.status==="RESOLVED").length;return 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-3",children:[e.jsx("div",{className:"p-2.5 bg-brand/20 rounded-xl",children:e.jsx(Z,{className:"w-7 h-7 text-brand"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-fg",children:"Support"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Get help and track your support requests"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(b,{variant:"secondary",onClick:()=>n("/support/feature-requests"),className:"inline-flex items-center gap-1.5",children:[e.jsx(D,{className:"w-4 h-4 text-status-yellow"}),"Feature Requests"]}),e.jsxs(b,{onClick:()=>x(!0),className:"inline-flex items-center gap-1.5",children:[e.jsx(I,{className:"w-4 h-4"}),"New Ticket"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"relative bg-surface-card bg-linear-to-br from-blue-500/5 to-transparent rounded-2xl border border-edge p-5 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-blue-500/5 rounded-full blur-2xl pointer-events-none"}),e.jsxs("div",{className:"relative flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider font-medium",children:"Active"}),e.jsx("div",{className:"w-8 h-8 bg-blue-500/10 rounded-lg flex items-center justify-center",children:e.jsx(Le,{className:"w-4 h-4 text-status-blue"})})]}),e.jsxs("p",{className:"text-3xl font-bold text-fg",children:[E,m?"+":""]}),m&&e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"of loaded tickets"})]}),e.jsxs("div",{className:"relative bg-surface-card bg-linear-to-br from-orange-500/5 to-transparent rounded-2xl border border-edge p-5 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-orange-500/5 rounded-full blur-2xl pointer-events-none"}),e.jsxs("div",{className:"relative flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider font-medium",children:"Awaiting Reply"}),e.jsx("div",{className:"w-8 h-8 bg-orange-500/10 rounded-lg flex items-center justify-center",children:e.jsx(M,{className:"w-4 h-4 text-status-orange"})})]}),e.jsxs("p",{className:"text-3xl font-bold text-status-orange",children:[C,m?"+":""]}),m&&e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"of loaded tickets"})]}),e.jsxs("div",{className:"relative bg-surface-card bg-linear-to-br from-green-500/5 to-transparent rounded-2xl border border-edge p-5 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-green-500/5 rounded-full blur-2xl pointer-events-none"}),e.jsxs("div",{className:"relative flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider font-medium",children:"Resolved"}),e.jsx("div",{className:"w-8 h-8 bg-green-500/10 rounded-lg flex items-center justify-center",children:e.jsx(ae,{className:"w-4 h-4 text-status-green"})})]}),e.jsxs("p",{className:"text-3xl font-bold text-status-green",children:[U,m?"+":""]}),m&&e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"of loaded tickets"})]}),e.jsxs("div",{className:"relative bg-surface-card bg-linear-to-br from-brand/5 to-transparent rounded-2xl border border-edge p-5 overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-brand/5 rounded-full blur-2xl pointer-events-none"}),e.jsxs("div",{className:"relative flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider font-medium",children:"Total Loaded"}),e.jsx("div",{className:"w-8 h-8 bg-brand/10 rounded-lg flex items-center justify-center",children:e.jsx(Me,{className:"w-4 h-4 text-brand"})})]}),e.jsxs("p",{className:"text-3xl font-bold text-fg",children:[i.length,m?"+":""]}),m&&e.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"more tickets available"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-gray-500",children:[e.jsx(se,{className:"w-4 h-4"}),e.jsx("span",{className:"text-xs font-medium uppercase tracking-wider",children:"Filter"})]}),e.jsxs("select",{value:r,onChange:l=>d(l.target.value),className:"px-3 py-2 bg-surface-input border border-edge rounded-lg text-sm text-fg-muted focus:outline-hidden focu
1s:ring-2 focus:ring-brand focus:border-brand transition-colors",children:[e.jsx("option",{value:"",children:"All Statuses"}),e.jsx("option",{value:"OPEN",children:"Open"}),e.jsx("option",{value:"IN_PROGRESS",children:"In Progress"}),e.jsx("option",{value:"WAITING_ON_CUSTOMER",children:"Awaiting Reply"}),e.jsx("option",{value:"RESOLVED",children:"Resolved"}),e.jsx("option",{value:"CLOSED",children:"Closed"}),e.jsx("option",{value:"REOPENED",children:"Reopened"})]}),e.jsxs("select",{value:s,onChange:l=>u(l.target.value),className:"px-3 py-2 bg-surface-input border border-edge rounded-lg text-sm text-fg-muted focus:outline-hidden focus:ring-2 focus:ring-brand focus:border-brand transition-colors",children:[e.jsx("option",{value:"",children:"All Priorities"}),e.jsx("option",{value:"P1",children:"P1 - Critical"}),e.jsx("option",{value:"P2",children:"P2 - High"}),e.jsx("option",{value:"P3",children:"P3 - Medium"}),e.jsx("option",{value:"P4",children:"P4 - Low"})]}),(r||s)&&e.jsx(b,{variant:"link",size:"sm",onClick:()=>{d(""),u("")},children:"Clear filters"})]}),y?e.jsx("div",{className:"space-y-3",children:[1,2,3,4,5].map(l=>e.jsxs("div",{className:"bg-surface-elevated rounded-xl border border-edge border-l-4 border-l-edge-strong p-4 animate-pulse",children:[e.jsx("div",{className:"h-4 w-3/4 bg-surface-elevated rounded mb-3"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"h-5 w-16 bg-surface-elevated rounded-full"}),e.jsx("div",{className:"h-5 w-10 bg-surface-elevated rounded-full"}),e.jsx("div",{className:"h-5 w-14 bg-surface-elevated rounded"})]})]},l))}):A?e.jsxs("div",{className:"bg-surface-card rounded-2xl border border-red-500/20 p-12 text-center",children:[e.jsx("div",{className:"w-14 h-14 bg-red-500/10 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(M,{className:"w-7 h-7 text-status-red"})}),e.jsx("p",{className:"text-sm text-status-red",children:A})]}):i.length===0?e.jsxs("div",{className:"bg-surface-card bg-linear-to-br from-brand/5 to-transparent rounded-2xl border border-edge p-16 text-center",children:[e.jsx("div",{className:"w-20 h-20 bg-brand/10 rounded-full flex items-center justify-center mx-auto mb-5",children:e.jsx(Z,{className:"w-10 h-10 text-brand/60"})}),e.jsx("h3",{className:"text-lg font-semibold text-fg-muted mb-2",children:r||s?"No matching tickets":"No tickets yet"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6 max-w-md mx-auto",children:r||s?"Try adjusting your filters or create a new ticket":"Create a support ticket to get help from our team. We typically respond within your SLA window."}),e.jsxs(b,{onClick:()=>x(!0),className:"inline-flex items-center gap-1.5",children:[e.jsx(I,{className:"w-4 h-4"}),"Create Ticket"]})]}):e.jsxs("div",{className:"space-y-3",children:[i.map(l=>e.jsx(Ve,{ticket:l,onClick:()=>n(`/support/tickets/${l.ticketId}`)},l.ticketId)),h&&e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(b,{variant:"secondary",onClick:H,disabled:f,className:"inline-flex items-center gap-2",children:f?e.jsxs(e.Fragment,{children:[e.jsx(re,{className:"w-4 h-4 animate-spin"}),"Loading..."]}):"Load More"})})]}),e.jsx(Ie,{isOpen:c,onClose:()=>x(!1),onSubmit:async l=>{const T=await N(l);return le({variant:"success",title:"Ticket created successfully"}),T},isSubmitting:a})]})};export{Ke 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.