import{r as d,j as e,J as A,d as w,e as ee,u as te,S as ae}from"./app-BBZbvTSO.js";import{c as i,S as O}from"./utils-YhN_nlHn.js";import{c as S,a as se,B as re}from"./button-CZmOQP7j.js";import{R as ne,T as oe,D as ie,C as le,a as de,X as ce,P as ue,O as he}from"./index-C0VDnRYN.js";import{T as pe,a as fe,b as me,c as xe}from"./tooltip-CRkL5R4V.js";import{c as be,d as M,h as $,g as E,D as ge,a as ve,b as je}from"./dropdown-menu-DkvU_mzU.js";import{c as we,b as R}from"./index-CbDI-tXU.js";import{u as Se}from"./Combination-9YgcTppv.js";import{P as T}from"./index-13DH8-b5.js";import{S as H}from"./settings-1sj5BLwD.js";import{A as ye}from"./app-logo-icon-BZsH9yGo.js";import{K as Ne,S as ke}from"./index-BnKWxTXF.js";import{I as _e}from"./image-BEhzBCM8.js";import{G as Ae}from"./globe-DRyUQWUz.js";import{U as P}from"./users-DU0sA3Q7.js";import{L as Ce}from"./layout-grid-CF44vN4j.js";import{C as Me}from"./chevron-right-fDICdnKB.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ee=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Le=S("ChevronsUpDown",Ee);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ie=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],De=S("Folder",Ie);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Re=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],ze=S("LogOut",Re);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Te=S("Monitor",Oe);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Be=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],$e=S("Moon",Be);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Ue=S("PanelLeft",Pe);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],qe=S("Sun",Fe);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const He=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Ke=S("Webhook",He),L=768;function K(){const[t,a]=d.useState(void 0);return d.useEffect(()=>{const s=window.matchMedia(`(max-width: ${L-1}px)`),r=()=>{a(window.innerWidth<L)};return s.addEventListener("change",r),a(window.innerWidth<L),()=>s.removeEventListener("change",r)},[]),!!t}function We({...t}){return e.jsx(ne,{"data-slot":"sheet",...t})}function Ge({...t}){return e.jsx(ue,{"data-slot":"sheet-portal",...t})}function Ve({className:t,...a}){return e.jsx(he,{"data-slot":"sheet-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t),...a})}function Xe({className:t,children:a,side:s="right",...r}){return e.jsxs(Ge,{children:[e.jsx(Ve,{}),e.jsxs(le,{"data-slot":"sheet-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...r,children:[a,e.jsxs(de,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(ce,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ze({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:i("flex flex-col gap-1.5 p-4",t),...a})}function Je({className:t,...a}){return e.jsx(oe,{"data-slot":"sheet-title",className:i("text-foreground font-semibold",t),...a})}function Ye({className:t,...a}){return e.jsx(ie,{"data-slot":"sheet-description",className:i("text-muted-foreground text-sm",t),...a})}const Qe="sidebar_state",et=60*60*24*7,tt="16rem",at="18rem",st="3rem",rt="b",W=d.createContext(null);function C(){const t=d.useContext(W);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function nt({defaultOpen:t=!0,open:a,onOpenChange:s,className:r,style:n,children:o,...p}){const l=K(),[c,f]=d.useState(!1),[g,u]=d.useState(t),h=a??g,m=d.useCallback(b=>{const j=typeof b=="function"?b(h):b;s?s(j):u(j),document.cookie=`${Qe}=${j}; path=/; max-age=${et}`},[s,h]),v=d.useCallback(()=>l?f(b=>!b):m(b=>!b),[l,m,f]);d.useEffect(()=>{const b=j=>{j.key===rt&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),v())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[v]);const x=h?"expanded":"collapsed",y=d.useMemo(()=>({state:x,open:h,setOpen:m,isMobile:l,openMobile:c,setOpenMobile:f,toggleSidebar:v}),[x,h,m,l,c,f,v]);return e.jsx(W.Provider,{value:y,children:e.jsx(pe,{delayDuration:0,children:e.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":tt,"--sidebar-width-icon":st,...n},className:i("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...p,children:o})})})}function ot({side:t="left",variant:a="sidebar",collapsible:s="offcanvas",className:r,children:n,...o}){const{isMobile:p,state:l,openMobile:c,setOpenMobile:f}=C();return s==="none"?e.jsx("div",{"data-slot":"sidebar",className:i("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...o,children:n}):p?e.jsxs(We,{open:c,onOpenChange:f,...o,children:[e.jsxs(Ze,{className:"sr-only",children:[e.jsx(Je,{children:"Sidebar"}),e.jsx(Ye,{children:"Displays the mobile sidebar."})]}),e.jsx(Xe,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":at},side:t,children:e.jsx("div",{className:"flex h-full w-full flex-col",children:n})})]}):e.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?s:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{className:i("relative h-svh w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{className:i("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:e.jsx("div",{"data-sidebar":"sidebar",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n})})]})}function it({className:t,onClick:a,...s}){const{toggleSidebar:r}=C();return e.jsxs(re,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:i("h-7 w-7",t),onClick:n=>{a==null||a(n),r()},...s,children:[e.jsx(Ue,{}),e.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function lt({className:t,...a}){return e.jsx("main",{"data-slot":"sidebar-inset",className:i("bg-background relative flex max-w-full min-h-svh flex-1 flex-col","peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-0",t),...a})}function dt({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:i("flex flex-col gap-2 p-2",t),...a})}function ct({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:i("flex flex-col gap-2",t),...a})}function ut({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function z({className:t,...a}){return e.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i("relative flex w-full min-w-0 flex-col p-2",t),...a})}function ht({className:t,asChild:a=!1,...s}){const r=a?O:"div";return e.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:i("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t),...s})}function N({className:t,...a}){return e.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i("flex w-full min-w-0 flex-col gap-1",t),...a})}function k({className:t,...a}){return e.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i("group/menu-item relative",t),...a})}const pt=se("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _({asChild:t=!1,isActive:a=!1,variant:s="default",size:r="default",tooltip:n,className:o,...p}){const l=t?O:"button",{isMobile:c,state:f}=C(),g=e.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:i(pt({variant:s,size:r}),o),...p});return n?(typeof n=="string"&&(n={children:n}),e.jsxs(fe,{children:[e.jsx(me,{asChild:!0,children:g}),e.jsx(xe,{side:"right",align:"center",hidden:f!=="collapsed"||c,...n})]})):g}function ft({variant:t="header",children:a,...s}){return t==="sidebar"?e.jsx(lt,{...s,children:a}):e.jsx("main",{className:"mx-auto flex h-full w-full max-w-7xl flex-1 flex-col gap-4 rounded-xl",...s,children:a})}function mt({children:t,variant:a="header"}){const s=A().props.sidebarOpen;return a==="header"?e.jsx("div",{className:"flex min-h-screen w-full flex-col",children:t}):e.jsx(nt,{defaultOpen:s,children:t})}function xt({items:t=[]}){const a=A();return e.jsx(z,{className:"px-2 py-0",children:e.jsx(N,{children:t.map(s=>e.jsx(k,{children:e.jsx(_,{asChild:!0,isActive:s.href===a.url,tooltip:{children:s.title},children:s.href==="/"?e.jsxs(w,{href:s.href,children:[s.icon&&e.jsx(s.icon,{}),e.jsx("span",{children:s.title})]}):e.jsxs(w,{href:s.href,children:[s.icon&&e.jsx(s.icon,{}),e.jsx("span",{children:s.title})]})})},s.title))})})}var I={exports:{}},D={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var U;function bt(){if(U)return D;U=1;var t=ee();function a(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var s=typeof Object.is=="function"?Object.is:a,r=t.useState,n=t.useEffect,o=t.useLayoutEffect,p=t.useDebugValue;function l(u,h){var m=h(),v=r({inst:{value:m,getSnapshot:h}}),x=v[0].inst,y=v[1];return o(function(){x.value=m,x.getSnapshot=h,c(x)&&y({inst:x})},[u,m,h]),n(function(){return c(x)&&y({inst:x}),u(function(){c(x)&&y({inst:x})})},[u]),p(m),m}function c(u){var h=u.getSnapshot;u=u.value;try{var m=h();return!s(u,m)}catch{return!0}}function f(u,h){return h()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return D.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,D}var F;function gt(){return F||(F=1,I.exports=bt()),I.exports}var vt=gt();function jt(){return vt.useSyncExternalStore(wt,()=>!0,()=>!1)}function wt(){return()=>{}}var B="Avatar",[St,ua]=we(B),[yt,G]=St(B),V=d.forwardRef((t,a)=>{const{__scopeAvatar:s,...r}=t,[n,o]=d.useState("idle");return e.jsx(yt,{scope:s,imageLoadingStatus:n,onImageLoadingStatusChange:o,children:e.jsx(T.span,{...r,ref:a})})});V.displayName=B;var X="AvatarImage",Z=d.forwardRef((t,a)=>{const{__scopeAvatar:s,src:r,onLoadingStatusChange:n=()=>{},...o}=t,p=G(X,s),l=Nt(r,o),c=Se(f=>{n(f),p.onImageLoadingStatusChange(f)});return R(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?e.jsx(T.img,{...o,ref:a,src:r}):null});Z.displayName=X;var J="AvatarFallback",Y=d.forwardRef((t,a)=>{const{__scopeAvatar:s,delayMs:r,...n}=t,o=G(J,s),[p,l]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),p&&o.imageLoadingStatus!=="loaded"?e.jsx(T.span,{...n,ref:a}):null});Y.displayName=J;function q(t,a){return t?a?(t.src!==a&&(t.src=a),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Nt(t,{referrerPolicy:a,crossOrigin:s}){const r=jt(),n=d.useRef(null),o=r?(n.current||(n.current=new window.Image),n.current):null,[p,l]=d.useState(()=>q(o,t));return R(()=>{l(q(o,t))},[o,t]),R(()=>{const c=u=>()=>{l(u)};if(!o)return;const f=c("loaded"),g=c("error");return o.addEventListener("load",f),o.addEventListener("error",g),a&&(o.referrerPolicy=a),typeof s=="string"&&(o.crossOrigin=s),()=>{o.removeEventListener("load",f),o.removeEventListener("error",g)}},[o,s,a]),p}var kt=V,_t=Z,At=Y;function Ct({className:t,...a}){return e.jsx(kt,{"data-slot":"avatar",className:i("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...a})}function Mt({className:t,...a}){return e.jsx(_t,{"data-slot":"avatar-image",className:i("aspect-square size-full",t),...a})}function Et({className:t,...a}){return e.jsx(At,{"data-slot":"avatar-fallback",className:i("bg-muted flex size-full items-center justify-center rounded-full",t),...a})}function Lt(){return d.useCallback(t=>{const a=t.trim().split(" ");if(a.length===0)return"";if(a.length===1)return a[0].charAt(0).toUpperCase();const s=a[0].charAt(0),r=a[a.length-1].charAt(0);return`${s}${r}`.toUpperCase()},[])}function Q({user:t,showEmail:a=!1}){const s=Lt();return e.jsxs(e.Fragment,{children:[e.jsxs(Ct,{className:"h-8 w-8 overflow-hidden rounded-full",children:[e.jsx(Mt,{src:t.avatar,alt:t.name}),e.jsx(Et,{className:"rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white",children:s(t.name)})]}),e.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[e.jsx("span",{className:"truncate font-medium",children:t.name}),a&&e.jsx("span",{className:"text-muted-foreground truncate text-xs",children:t.email})]})]})}function It(){return d.useCallback(()=>{document.body.style.removeProperty("pointer-events")},[])}function Dt({showLabels:t=!0,className:a="",...s}){const{appearance:r,updateAppearance:n}=te(),o=[{value:"light",icon:qe,label:"Light"},{value:"dark",icon:$e,label:"Dark"},{value:"system",icon:Te,label:"System"}];return e.jsx("div",{className:i("inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",a),...s,children:o.map(({value:p,icon:l,label:c})=>e.jsxs("button",{onClick:()=>n(p),className:i("flex items-center rounded-md px-3.5 py-1.5 transition-colors",r===p?"bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100":"text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60"),children:[e.jsx(l,{className:"-ml-1 h-4 w-4"}),t&&e.jsx("span",{className:"ml-1.5 text-sm",children:c})]},p))})}function Rt({user:t}){const a=It(),s=()=>{a(),ae.flushAll()};return e.jsxs(e.Fragment,{children:[e.jsx(be,{className:"p-0 font-normal",children:e.jsx("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:e.jsx(Q,{user:t,showEmail:!0})})}),e.jsx(M,{}),e.jsx($,{children:e.jsx(E,{asChild:!0,children:e.jsx(Dt,{className:"justify-center",showLabels:!1})})}),e.jsx(M,{}),e.jsx($,{children:e.jsx(E,{asChild:!0,children:e.jsxs(w,{className:"block w-full",href:route("profile.edit"),as:"button",onClick:a,children:[e.jsx(H,{className:"mr-2"}),"Settings"]})})}),e.jsx(M,{}),e.jsx(E,{asChild:!0,children:e.jsxs(w,{className:"block w-full",method:"post",href:route("logout"),as:"button",onClick:s,children:[e.jsx(ze,{className:"mr-2"}),"Log out"]})})]})}function zt(){const{auth:t}=A().props,{state:a}=C(),s=K();return e.jsx(N,{className:"px-2",children:e.jsx(k,{children:e.jsxs(ge,{children:[e.jsx(ve,{asChild:!0,children:e.jsxs(_,{size:"lg",className:"text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent group",children:[e.jsx(Q,{user:t.user}),e.jsx(Le,{className:"ml-auto size-4"})]})}),e.jsx(je,{className:"w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",align:"end",side:s?"bottom":a==="collapsed"?"left":"bottom",children:e.jsx(Rt,{user:t.user})})]})})})}function Ot(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{children:e.jsx(ye,{className:"size-7 group-has-data-[state=collapsed]/sidebar-wrapper:size-8 fill-current dark:text-white text-black block mx-auto"})}),e.jsx("div",{className:"ml-1 grid flex-1 text-left text-sm group-has-data-[state=collapsed]/sidebar-wrapper:hidden",children:e.jsx("span",{className:"mb-0.5 truncate leading-none font-semibold",children:"ElmapiCMS v3.0"})})]})}const Tt=[{title:"Dashboard",href:"/",icon:Ce}];function Bt(){const t=A(),a=t.props.project,s=A().props.userCan,r=a?[{title:"Collections",href:route("projects.show",a.id),icon:De},{title:"Asset Management",href:route("assets.index",a.id),icon:_e,permission:"access_assets"},{title:"Settings",href:route("projects.settings.project",a.id),icon:H,permission:"access_project_settings"},{title:"Localization",href:route("projects.settings.localization",a.id),icon:Ae,permission:"access_localization_settings"},{title:"User Access",href:route("projects.settings.user-access",a.id),icon:P,permission:"access_user_access_settings"},{title:"API Access",href:route("projects.settings.api-access",a.id),icon:Ne,permission:"access_api_access_settings"},{title:"Webhooks",href:route("projects.settings.webhooks",a.id),icon:Ke,permission:"access_webhooks_settings"}]:[];return e.jsxs(ot,{collapsible:"icon",variant:"inset",children:[e.jsx(dt,{children:e.jsx(N,{children:e.jsx(k,{children:e.jsx(_,{size:"lg",asChild:!0,children:e.jsx(w,{href:"/",children:e.jsx(Ot,{})})})})})}),e.jsxs(ut,{children:[e.jsx(xt,{items:Tt}),a&&e.jsxs(z,{className:"px-2 py-0 mt-6",children:[e.jsx(ht,{children:a.name}),e.jsx(N,{children:r.filter(n=>!n.permission||s[n.permission]).map(n=>e.jsx(k,{children:e.jsx(_,{asChild:!0,isActive:t.url.includes(n.href),tooltip:{children:n.title},children:e.jsxs(w,{href:n.href,children:[n.icon&&e.jsx(n.icon,{}),e.jsx("span",{children:n.title})]})})},n.title))})]})]}),e.jsxs(ct,{children:[(s.access_users||s.access_roles||s.access_permissions)&&e.jsx(z,{className:"px-2 py-0 mt-6",children:e.jsx(N,{children:e.jsx(k,{children:e.jsx(_,{asChild:!0,isActive:t.url.includes("/user-management/users")||t.url.includes("/user-management/roles")||t.url.includes("/user-management/permissions"),tooltip:{children:"Users & Roles"},children:e.jsxs(w,{href:"/user-management/"+(s.access_users?"users":s.access_roles?"roles":"permissions"),children:[e.jsx(P,{}),e.jsx("span",{children:"Users & Roles"})]})})})})}),e.jsx(ke,{className:"my-2 border-t"}),e.jsx(zt,{})]})]})}function $t({...t}){return e.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...t})}function Pt({className:t,...a}){return e.jsx("ol",{"data-slot":"breadcrumb-list",className:i("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",t),...a})}function Ut({className:t,...a}){return e.jsx("li",{"data-slot":"breadcrumb-item",className:i("inline-flex items-center gap-1.5",t),...a})}function Ft({asChild:t,className:a,...s}){const r=t?O:"a";return e.jsx(r,{"data-slot":"breadcrumb-link",className:i("hover:text-foreground transition-colors",a),...s})}function qt({className:t,...a}){return e.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i("text-foreground font-normal",t),...a})}function Ht({children:t,className:a,...s}){return e.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i("[&>svg]:size-3.5",a),...s,children:t??e.jsx(Me,{})})}function Kt({breadcrumbs:t}){return e.jsx(e.Fragment,{children:t.length>0&&e.jsx($t,{children:e.jsx(Pt,{children:t.map((a,s)=>{const r=s===t.length-1;return e.jsxs(d.Fragment,{children:[e.jsx(Ut,{children:r?e.jsx(qt,{children:a.title}):e.jsx(Ft,{asChild:!0,children:e.jsx(w,{href:a.href,children:a.title})})}),!r&&e.jsx(Ht,{})]},s)})})})})}function Wt({breadcrumbs:t=[]}){return e.jsx("header",{className:"border-sidebar-border/50 flex h-16 shrink-0 items-center gap-2 border-b px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(it,{className:"-ml-1"}),e.jsx(Kt,{breadcrumbs:t})]})})}function Gt({children:t,breadcrumbs:a=[]}){return e.jsxs(mt,{variant:"sidebar",children:[e.jsx(Bt,{}),e.jsxs(ft,{variant:"sidebar",children:[e.jsx(Wt,{breadcrumbs:a}),e.jsx("div",{className:"p-6",children:t})]})]})}const ha=({children:t,breadcrumbs:a,...s})=>e.jsx(Gt,{breadcrumbs:a,...s,children:t});export{ha as A,Ke as W,Dt as a};
