1import{_ as U}from"./JG3qEi5P.js";import{z as k,A as D,aN as x,r as p,o as A,be as M,E as H,J as c,c as S,d as W,f as e,w as a,C as o,D as $,F as z,H as E,g as i,Y as F}from"./VgBorwrq.js";import{_ as O,a as R}from"./C8P9mq9v.js";import{P as V,a as Y}from"./BeWNnEml.js";import{u as J,P as K}from"./C9kdqviY.js";import{u as T}from"./CQ6_-kxF.js";import"./x6enSH2r.js";import"./Bpeu7u6T.js";import"./CYWeTxJQ.js";import"./eHp35Szw.js";import"./CyODgdL3.js";import"./DlAUqK2U.js";import"./BEW4_GZ-.js";import"./CriCvDlX.js";import"./CKuJZUZk.js";import"./QdjgxSxK.js";import"./DgTypFR6.js";import"./DqI5o8zR.js";import"./krnj-eMa.js";import"./jFYhBC76.js";import"./ByEHu7lo.js";import"./CdrMbKAb.js";import"./Clcjs03C.js";import"./B0cSV_rs.js";import"./CRdkpxVA.js";import"./BjgGBYsp.js";import"./CU0CsRYs.js";import"./1Cm0qIRS.js";import"./DSSuMVQk.js";import"./DISqz-vg.js";import"./Bb08LM2a.js";import"./ByJrdajD.js";import"./DmUSA5lk.js";import"./BaYVFhrH.js";import"./ZmTBIm_9.js";import"./BlzEjeH9.js";const j={class:"space-y-6"},Me=k({__name:"index",async setup(q){let s,m;D({title:"Overview - Partner Portal",meta:[{name:"description",content:"Partner organization usage and websites"}]});const{hasPortalAccess:d}=T(),{getStats:u}=J(),{openPlanPicker:_}=x(),r=p(!1),l=p(0);A(()=>{if(!d.value)throw M({statusCode:403,statusMessage:"Forbidden"})});const{data:t,pending:f,refresh:h}=([s,m]=H(()=>E("portal-home-stats",()=>u(),{server:!1,lazy:!1})),s=await s,m(),s),v=c(()=>!!t.value?.demo_accounts.can_create),b=c(()=>!!(t.value?.companies.can_create||t.value?.companies.is_unlimited));function g(){if(t.value&&!v.value&&!b.value){_("You have reached your website and demo account limits. Upgrade to create more.");return}r.value=!0}function P(){l.value++,h()}return(G,n)=>{const w=U,C=F,y=R,B=O;return W(),S(z,null,[e(B,{id:"portal-home"},{header:a(()=>[e(y,{title:"Overview"},{leading:a(()=>[e(w,{"leading-icon":"i-lucide-panel-left"})]),right:a(()=>[e(C,{color:"neutral",icon:"i-lucide-plus",onClick:g},{default:a(()=>[...n[1]||(n[1]=[i("span",{class:"hidden sm:inline"},"New website",-1),i("span",{class:"sm:hidden"},"New",-1)])]),_:1})]),_:1})]),body:a(()=>[i("div",j,[e(V,{stats:o(t),pending:o(f)},null,8,["stats","pending"]),e(Y,{"refresh-key":o(l)},null,8,["refresh-key"])])]),_:1}),e(K,{open:o(r),"onUpdate:open":n[0]||(n[0]=N=>$(r)?r.value=N:null),stats:o(t),onCreated:P},null,8,["open","stats"])],64)}}});export{Me 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.