(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[465],{18955:(e,t,r)=>{"use strict";r.d(t,{c:()=>i});var n=r(902);function o(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let i=o(0,n.c3);o(0,n.kc)},25157:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(95155),o=r(12115),i=r(4139),l=r(6707),s=r(73229),a=r(18955),c=r(57376);let d={bg:"#161616",surface:"#1e1e1e",surface2:"#252525",surface3:"#2e2e2e",border:"#2c2c2c",text:"#d0d0d0",muted:"#888",dim:"#4a4a4a",accent:"#3b97e3",accentMut:"rgba(59,151,227,0.12)"};function u(){return(0,n.jsx)(i.O,{children:(0,n.jsx)(h,{})})}function h(){var e,t,r;let{user:i,logout:u}=(0,l.A)(),h=(0,s.rd)(),p=(0,a.c)();if((0,o.useEffect)(()=>{(null==i?void 0:i.role)==="client"&&i.clientId?h.push("/clients/".concat(i.clientId)):(null==i?void 0:i.role)==="client"&&h.push("/tenants")},[i,h]),(null==i?void 0:i.role)==="client")return(0,n.jsxs)("div",{style:{minHeight:"100vh",background:d.bg,display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:12},children:[(0,n.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",border:"2px solid ".concat(d.surface3),borderTopColor:d.accent,animation:"homeSpin 0.7s linear infinite"}}),(0,n.jsx)("span",{style:{fontSize:11,color:d.muted,fontFamily:"monospace"},children:p("home.redirecting")})]}),(0,n.jsx)("style",{children:"@keyframes homeSpin { to { transform: rotate(360deg); } }"})]});let x=[{href:"/clients",label:p("home.clientsCard.title"),desc:p("home.clientsCard.description"),tag:"CLIENTS",icon:(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"}),(0,n.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,n.jsx)("path",{d:"M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"})]})},{href:"/tenants",label:p("home.tenantsCard.title"),desc:p("home.tenantsCard.description"),tag:"TENANTS",icon:(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),(0,n.jsx)("polyline",{points:"9 22 9 12 15 12 15 22"})]})},{href:"/metrics",label:p("home.metricsCard.title"),desc:p("home.metricsCard.description"),tag:"METRICS",icon:(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),(0,n.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),(0,n.jsx)("line",{x1:"6",y1:"20",x2:"6",y2:"14"}),(0,n.jsx)("line",{x1:"2",y1:"20",x2:"22",y2:"20"})]})},{href:"/subscriptions",label:"Subscription Plans",desc:"Create and manage KOMERO platform subscription plans",tag:"PLANS",icon:(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2",ry:"2"}),(0,n.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]})},{href:"/integrations",label:"Integration Catalog",desc:"Define purchasable integrations and bundle them into subscription plans",tag:"INTEGRATIONS",icon:(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"}),(0,n.jsx)("path",{d:"M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"})]})}];return(0,n.jsxs)("div",{style:{minHeight:"100vh",background:d.bg,color:d.text},children:[(0,n.jsx)(c.z,{title:p("home.title"),description:p("home.description")}),(0,n.jsxs)("main",{style:{maxWidth:900,margin:"0 auto",padding:"40px 20px"},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:22},children:[(0,n.jsx)("span",{style:{fontSize:9,fontWeight:800,letterSpacing:"0.16em",textTransform:"uppercase",color:d.dim,fontFamily:"monospace"},children:"Navigation"}),(0,n.jsx)("div",{style:{flex:1,height:1,background:d.border}})]}),(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:12},children:x.map(e=>(0,n.jsx)(f,{...e},e.href))}),i&&(0,n.jsxs)("div",{style:{marginTop:48,padding:"12px 16px",background:d.surface,border:"1px solid ".concat(d.border),borderRadius:6,display:"flex",alignItems:"center",gap:10},children:[(0,n.jsx)("div",{style:{width:28,height:28,borderRadius:"50%",background:d.accent,display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:800,color:"#fff",fontFamily:"monospace",flexShrink:0},children:null!=(r=null==(t=i.username)||null==(e=t[0])?void 0:e.toUpperCase())?r:"U"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{fontSize:11,fontWeight:700,color:d.text,fontFamily:"monospace"},children:i.username}),(0,n.jsx)("div",{style:{fontSize:9,color:d.muted,fontFamily:"monospace",textTransform:"uppercase",letterSpacing:"0.08em"},children:i.role})]})]})]})]})}function f(e){let{href:t,label:r,desc:o,tag:i,icon:l}=e;return(0,n.jsx)(s.N_,{href:t,style:{textDecoration:"none",display:"block"},children:(0,n.jsxs)("div",{className:"gjs-nav-card",style:{padding:"20px 18px",background:d.surface,border:"1px solid ".concat(d.border),borderRadius:8,cursor:"pointer",transition:"border-color 0.15s, background 0.15s",position:"relative",overflow:"hidden"},onMouseEnter:e=>{let t=e.currentTarget;t.style.borderColor="rgba(59,151,227,0.4)",t.style.background=d.surface2},onMouseLeave:e=>{let t=e.currentTarget;t.style.borderColor=d.border,t.style.background=d.surface},children:[(0,n.jsx)("div",{style:{position:"absolute",top:12,right:12,fontSize:8,fontWeight:800,letterSpacing:"0.12em",fontFamily:"monospace",color:d.dim,padding:"2px 5px",borderRadius:2,background:d.surface3,border:"1px solid ".concat(d.border)},children:i}),(0,n.jsx)("div",{style:{width:38,height:38,borderRadius:7,background:d.accentMut,border:"1px solid rgba(59,151,227,0.18)",display:"flex",alignItems:"center",justifyContent:"center",color:d.accent,marginBottom:16},children:l}),(0,n.jsx)("div",{style:{fontSize:13,fontWeight:700,color:d.text,marginBottom:5,fontFamily:"monospace"},children:r}),(0,n.jsx)("p",{style:{fontSize:11,color:d.muted,lineHeight:1.5,margin:0},children:o}),(0,n.jsx)("div",{style:{position:"absolute",bottom:14,right:14,color:d.dim,transition:"color 0.15s, transform 0.15s"},className:"gjs-nav-arrow",children:(0,n.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M5 12h14M12 5l7 7-7 7"})})})]})})}},55251:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(20063),o=r(12115),i=r.t(o,2),l=r(902),s=i["use".trim()],a=r(4106),c=r(64707),d=r(85919),u=r(95155),h=r(57301);function f(e){let{Link:t,config:r,getPathname:i,...f}=function(e,t){var r,i,l;let h={...r=t||{},localePrefix:"object"==typeof(l=r.localePrefix)?l:{mode:l||"always"},localeCookie:!!((i=r.localeCookie)??1)&&{name:"NEXT_LOCALE",sameSite:"lax",..."object"==typeof i&&i},localeDetection:r.localeDetection??!0,alternateLinks:r.alternateLinks??!0},f=h.pathnames,p=(0,o.forwardRef)(function({href:t,locale:r,...n},o){let i,l;"object"==typeof t?(i=t.pathname,l=t.params):i=t;let d=(0,a._x)(t),p=e(),m=(0,a.yL)(p)?s(p):p,g=d?x({locale:r||m,href:null==f?i:{pathname:i,params:l},forcePrefix:null!=r||void 0}):i;return(0,u.jsx)(c.default,{ref:o,href:"object"==typeof t?{...t,pathname:g}:g,locale:r,localeCookie:h.localeCookie,...n})});function x(e){let t,{forcePrefix:r,href:n,locale:o}=e;return null==f?"object"==typeof n?(t=n.pathname,n.query&&(t+=(0,d.Zn)(n.query))):t=n:t=(0,d.FP)({locale:o,...(0,d.TK)(n),pathnames:h.pathnames}),(0,d.x3)(t,o,h,r)}function m(e){return function(t,...r){return e(x(t),...r)}}return{config:h,Link:p,redirect:m(n.redirect),permanentRedirect:m(n.permanentRedirect),getPathname:x}}(l.Ym,e);return{...f,Link:t,usePathname:function(){let e=function(e){let t=(0,n.usePathname)(),r=(0,l.Ym)();return(0,o.useMemo)(()=>{if(!t)return t;let n=t,o=(0,a.XP)(r,e.localePrefix);if((0,a.wO)(o,t))n=(0,a.MY)(t,o);else if("never"!==e.localePrefix.mode&&e.localePrefix.prefixes){let e=(0,a.bL)(r);(0,a.wO)(e,t)&&(n=(0,a.MY)(t,e))}return n},[e.localePrefix,r,t])}(r),t=(0,l.Ym)();return(0,o.useMemo)(()=>e&&r.pathnames?(0,d.aM)(t,e,r.pathnames):e,[t,e])},useRouter:function(){let e=(0,n.useRouter)(),t=(0,l.Ym)(),s=(0,n.usePathname)();return(0,o.useMemo)(()=>{function n(e){return function(n,o){let{locale:l,...a}=o||{},c=[i({href:n,locale:l||t,forcePrefix:null!=l||void 0})];Object.keys(a).length>0&&c.push(a),(0,h.A)(r.localeCookie,s,t,l),e(...c)}}return{...e,push:n(e.push),replace:n(e.replace),prefetch:n(e.prefetch)}},[t,s,e])},getPathname:i}}},80650:(e,t,r)=>{Promise.resolve().then(r.bind(r,25157))},84497:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{A:()=>n})}},e=>{e.O(0,[4707,2956,8441,1255,7358],()=>e(e.s=80650)),_N_E=e.O()}]);