1import{r as n,j as e,L as s}from"./app-DNe5vFRE.js";import g from"./AdminLayout-C1ZQsjpE.js";import{h as u}from"./moment-B-YVwB4U.js";import{c as i}from"./Utilities-D6wiwRoK.js";/* empty css */import f from"./UserProfile-DDGsoIrU.js";import{F as j}from"./FolderOpenIcon-Bd_5Ypnj.js";import"./DarkModeSwitch-BOu0dI_y.js";import"./dialog-CWbWQCHj.js";import"./transition-BCwysbg9.js";import"./use-resolve-button-type-CWYT3wNy.js";import"./CheckIcon-BikM7syj.js";import"./DashboardAlerts-DBgmoDoN.js";import"./CurrencyDollarIcon-Di6uxUXb.js";import"./ThemeClipLoader-Cyil_Bll.js";import"./UsersIcon-BL-64hYO.js";import"./PuzzlePieceIcon-iPc8Qfma.js";import"./CreditCardIcon-C2nMh7cl.js";import"./GlobeAsiaAustraliaIcon-Dpf4aGPk.js";import"./PhotoIcon-C5f6ifSH.js";import"./AdjustmentsHorizontalIcon-FcbUwj8f.js";import"./XMarkIcon-QcyYx_g9.js";import"./ChevronUpIcon-iyMOWmJL.js";import"./ChevronDownIcon-Bldz-nWn.js";import"./Bars3BottomLeftIcon-ESaxE1AW.js";import"./ChevronRightIcon-4vsiV2s3.js";import"./MagnifyingGlassIcon-CgeroQUf.js";import"./ArrowsPointingOutIcon-BWpUzS9g.js";import"./menu-D3orKPBK.js";import"./calculate-active-index-B4Ujw_fi.js";import"./HeroIcon-DRjY_EHY.js";import"./UserStatusBadge-BhVB48_-.js";import"./InvoicesTable-CVO5n1sA.js";import"./moment-8Zmknldu.js";import"./LoadingButton-xRnDVZTV.js";import"./ApplyCreditsModal-dPhyXqWh.js";import"./XMarkIcon-C7A-CHgG.js";function ie({statusFilter:r,initialTickets:o,allCount:l,openCount:a,closedCount:m,holdCount:c}){const[p,y]=n.useState(o.data),[d,x]=n.useState(null);return e.jsxs(g,{section:"Support",title:"Support",heading:"Support Tickets",subheading:"Support",children:[e.jsx("div",{children:e.jsxs("div",{className:"mt-6 md:mt-0 w-full grid grid-cols-1 gap-5 sm:grid-cols-4",children:[e.jsxs(s,{href:"/admin/support?status=all",className:i(r=="all"?"ring-1 ring-indigo-800":"","overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6"),children:[e.jsx("dt",{className:"truncate text-sm font-medium text-gray-500",children:"All"}),e.jsx("dd",{className:"mt-1 text-3xl font-semibold tracking-tight text-gray-900",children:l})]}),e.jsxs(s,{href:"/admin/support?status=open",className:i(r=="open"?"ring-1 ring-indigo-800":"","overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6"),children:[e.jsx("dt",{className:"truncate text-sm font-medium text-gray-500",children:"Open"}),e.jsx("dd",{className:"mt-1 text-3xl font-semibold tracking-tight text-gray-900",children:a})]}),e.jsxs(s,{href:"/admin/support?status=hold",className:i(r=="hold"?"ring-1 ring-indigo-800":"","overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6"),children:[e.jsx("dt",{className:"truncate text-sm font-medium text-gray-500",children:"On-hold"}),e.jsx("dd",{className:"mt-1 text-3xl font-semibold tracking-tight text-gray-900",children:c})]}),e.jsxs(s,{href:"/admin/support?status=closed",className:i(r=="closed"?"ring-1 ring-indigo-800":"","overflow-hidden rounded-lg bg-white px-4 py-5 shadow sm:p-6"),children:[e.jsx("dt",{className:"truncate text-sm font-medium text-gray-500",children:"Resolved"}),e.jsx("dd",{className:"mt-1 text-3xl font-semibold tracking-tight text-gray-900",children:m})]})]})}),e.jsx("div",{children:e.jsxs("div",{className:"overflow-hidden px-8 pt-4 mt-4 pb-12 rounded-lg bg-white shadow mt-4 p-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-medium text-gray-900",children:"Tickets"}),e.jsx("p",{className:"mt-1 text-gray-500",children:"We reply within minutes on urgent queries."})]}),e.jsx("div",{children:e.jsx("button",{type:"button",disabled:!0,title:"Not implemented yet",className:"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm opacity-50 cursor-not-allowed",children:"Create Ticket"})})]}),e.jsx("ul",{role:"list",className:"mt-6 divide-y divide-gray-200 border-t border-b border-gray-200",children:p.map((t,h)=>e.jsx("li",{children:e.jsxs("div",{className:"group relative flex items-start space-x-3 py-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("span",{className:i("bg-indigo-50 inline-flex items-center justify-center h-10 w-10 rounded-lg"),children:e.jsx(j,{className:"h-6 w-6 text-indigo-900","aria-hidden":"true"})})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"font-medium text-gray-900",children:e.jsxs(s,{href:`/admin/support/ticket/${t.uuid}`,children:[e.jsx("span",{className:"absolute inset-0","aria-hidden":"true"}),t.subject]})}),e.jsxs("p",{className:"text-gray-500",children:[e.jsx("span",{className:"focus:underline",children:t.user?t.user.email:"Anonymous"})," ","created ",u(t.created_at).fromNow()]})]}),e.jsxs("div",{className:"flex-shrink-0 self-center",children:[t.status=="hold"&&e.jsx("span",{className:"inline-flex items-center rounded-md bg-gray-50 px-2 py-1 text-xs font-medium text-gray-600 ring-1 ring-inset ring-gray-500/10",children:"ON HOLD"}),t.status=="open"&&e.jsx("span",{className:"inline-flex items-center rounded-md bg-yellow-50 px-2 py-1 text-xs font-medium text-yellow-800 ring-1 ring-inset ring-yellow-600/20",children:"PENDING"}),t.status=="closed"&&e.jsx("span",{className:"inline-flex items-center rounded-md bg-green-50 px-2 py-1 text-xs font-medium text-green-700 ring-1 ring-inset ring-green-600/20",children:"CLOSED"})]})]})},h))})]})}),d!=null&&e.jsx(f,{userId:d,onClose:()=>x(null)})]})}export{ie 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.