"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),d=require("react-router-dom"),b=require("react-i18next"),c=require("./index-Bin-Gy1w.js"),n=["submitted","assigned"];function m(){const{t}=b.useTranslation("support"),[i,a]=d.useSearchParams(),u=()=>{const e=i.get("tab");return e&&n.includes(e)?e:"submitted"},[s,l]=o.useState(u);return o.useEffect(()=>{const e=i.get("tab");s==="submitted"?e&&(i.delete("tab"),a(i,{replace:!0})):e!==s&&a({tab:s},{replace:!0})},[s,i,a]),r.jsxs("div",{className:"space-y-4",children:[r.jsx(c.Breadcrumb,{items:[{label:t("title","Support"),href:"/support"},{label:t("list.myTicketsTitle","My Tickets")}]}),r.jsx("div",{className:"flex gap-1 border-b border-[var(--border-color)]",children:n.map(e=>r.jsx("button",{onClick:()=>l(e),className:`px-4 py-2 text-sm font-medium border-b-2 transition-colors ${s===e?"border-[var(--color-primary-600)] text-[var(--color-primary-600)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--border-color)]"}`,children:e==="assigned"?t("list.tabs.assigned","Assigned to me"):t("list.tabs.submitted","My tickets")},e))}),s==="assigned"&&r.jsx(c.TicketsListView,{mode:"assigned",showDrafts:!0,basePath:"/support/my-tickets",title:t("list.assignedTitle","Assigned Tickets"),subtitle:t("list.assignedSubtitle","Tickets assigned to you"),createPath:"/support/my-tickets/create"}),s==="submitted"&&r.jsx(c.TicketsListView,{mode:"user",showDrafts:!0,basePath:"/support/my-tickets",title:t("list.myTitle","Submitted Tickets"),subtitle:t("list.mySubtitle","Tickets you have created"),createPath:"/support/my-tickets/create"})]})}exports.MyTicketsPage=m;
//# sourceMappingURL=MyTicketsPage-CDQEpFDF.js.map
