1import{j as e,r as y}from"./vendor-ui-kEMjy5iA.js";import{u as v,S as A,a as L,b as u,c as k,d as C,e as P,f as I,g as x,h as n,i,j as O,N as E,k as B,l as _,T as M}from"./ThemeToggle-BaukP0nn.js";import{a7 as T,a8 as D,a9 as R,ad as q,ag as G,M as F,ah as U,am as $,$ as h,j as H,y as Q,ae as V,af as z,x as J,A as K,ai as W}from"./index-DGws7P8O.js";import{a as X,u as Y,L as Z,O as ee}from"./vendor-react-vSwiAXS4.js";import{B as se}from"./briefcase-DcX8hrvY.js";import{S as ae}from"./settings-DzKbKJzc.js";import{L as re}from"./log-out-CqmA7mUc.js";import"./separator-b5Ir1oua.js";import"./sheet-BKx6Mb8F.js";import"./skeleton-BQKudBqr.js";import"./sun-Dgq0xFbf.js";import"./vendor-query-CK8S1K6m.js";import"./vendor-motion-DB-1S_On.js";function te(){const{user:s,signOut:p}=T(),{permissions:r}=D(),{isImpersonating:c,impersonatingAccountName:o,stopImpersonation:j}=R(),{state:b}=v(),g=X(),d=Y(),l=b==="collapsed",f=a=>{const[t,w]=a.split("?");if(d.pathname!==t)return!1;const m=new URLSearchParams(d.search);return new URLSearchParams(w||"").get("type")==="agency"?m.get("type")==="agency":t==="/admin/accounts"?m.get("type")!=="agency":!0},S=[{title:"Overview",url:"/admin",icon:q,show:!0},{title:"Accounts",url:"/admin/accounts",icon:G,show:!0},{title:"Agencies",url:"/admin/accounts?type=agency",icon:se,show:r.role==="super_admin"},{title:"Subscribers",url:"/admin/subscribers",icon:F,show:!0},{title:"Demo Leads",url:"/admin/leads",icon:U,show:!0},{title:"Revenue",url:"/admin/revenue",icon:$,show:r.canViewBilling},{title:"Audit Log",url:"/admin/audit-log",icon:h,show:r.role==="super_admin"},{title:"Inbox Apps",url:"/admin/inbox-apps",icon:H,show:r.role==="super_admin"},{title:"Content Engine",url:"/admin/content",icon:Q,show:r.role==="super_admin"},{title:"Settings",url:"/admin/settings",icon:ae,show:r.role==="super_admin"}],N=r.role==="super_admin"?"Super Admin":"Account Manager";return e.jsx(V,{delayDuration:0,children:e.jsxs(A,{collapsible:"icon",children:[e.jsxs(L,{children:[e.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[e.jsx("img",{src:z,alt:"PlayerOS",className:"w-7 h-7 shrink-0"}),!l&&e.jsxs("span",{className:"font-display font-bold text-base text-sidebar-foreground",children:["Player",e.jsx("span",{className:"text-primary",children:"OS"}),e.jsx("span",{className:"text-xs ml-1.5 text-muted-foreground font-normal",children:"Admin"})]})]}),e.jsx(u,{})]}),e.jsx(k,{children:e.jsxs(C,{children:[!l&&e.jsx(P,{children:"Platform"}),e.jsx(I,{children:e.jsx(x,{children:S.filter(a=>a.show).map(a=>{const t=f(a.url);return e.jsx(n,{children:e.jsx(i,{asChild:!0,tooltip:a.title,children:e.jsxs(Z,{to:a.url,className:J("hover:bg-sidebar-accent/50",t&&"bg-sidebar-accent text-primary font-medium"),children:[e.jsx(a.icon,{className:"w-4 h-4"}),e.jsx("span",{children:a.title})]})})},a.title)})})})]})}),e.jsxs(O,{children:[e.jsxs(x,{children:[r.role!=="super_admin"&&e.jsx(n,{children:e.jsx(i,{asChild:!0,tooltip:"Back to Dashboard",children:e.jsxs(E,{to:"/dashboard",className:"hover:bg-sidebar-accent/50",activeClassName:"",children:[e.jsx(K,{className:"w-4 h-4"}),e.jsx("span",{children:"Back to Dashboard"})]})})}),c&&e.jsx(n,{children:e.jsxs(i,{tooltip:`Exit ${o||"masquerade"}`,onClick:()=>j(),children:[e.jsx(W,{className:"w-4 h-4 text-amber-500"}),e.jsxs("span",{className:"text-amber-500",children:["Exit ",o||"masquerade"]})]})}),e.jsx(n,{children:e.jsxs(i,{tooltip:"Sign Out",onClick:async()=>{await p(),g("/auth")},children:[e.jsx(re,{className:"w-4 h-4"}),e.jsx("span",{children:"Sign Out"})]})})]}),!l&&e.jsxs(e.Fragment,{children:[e.jsx(u,{}),e.jsxs("div",{className:"px-2 py-2 space-y-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s==null?void 0:s.email}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(h,{className:"w-3 h-3 text-primary"}),e.jsx("span",{className:"text-xs text-primary font-medium",children:N})]}),c&&e.jsxs("p",{className:"text-[10px] text-amber-500 truncate mt-0.5",children:["Acting as ",o]})]})]})]})]})})}function ne(){y.useEffect(()=>{let s=document.querySelector('meta[name="robots"]');return s||(s=document.createElement("meta"),s.name="robots",document.head.appendChild(s)),s.content="noindex, nofollow",()=>{s==null||s.remove()}},[])}const Se=()=>(ne(),e.jsx(B,{children:e.jsxs("div",{className:"min-h-screen flex w-full bg-background dashboard-text",children:[e.jsx(te,{}),e.jsxs("main",{id:"main-content",className:"flex-1 flex flex-col",children:[e.jsxs("header",{className:"h-14 flex items-center border-b border-border px-4 gap-4 shrink-0",children:[e.jsx(_,{}),e.jsx("div",{className:"ml-auto",children:e.jsx(M,{})})]}),e.jsx("div",{className:"flex-1 p-6 overflow-auto",children:e.jsx(ee,{})})]})]})}));export{Se 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.