import{i as t}from"./_virtual___federation_fn_import-DB-0B1B_.js";import{j as e}from"./jsx-runtime-u17CrQMm.js";import{j as h}from"./index-KpBDpTrU.js";import{N as j}from"./new-dialog-HiOusHlT.js";import{s as o}from"./sortBy-C9bvycg5.js";const{appEntityType:y,AppUtils:u,libraryEntityType:g,LibraryUtils:f}=await t("@baseplate-dev/project-builder-lib"),{useProjectDefinition:N}=await t("@baseplate-dev/project-builder-lib/web"),{Badge:l,Button:b,Card:d,Empty:k,EmptyContent:v,EmptyDescription:w,EmptyHeader:E,EmptyMedia:L,EmptyTitle:D}=await t("@baseplate-dev/ui-components"),{Link:p}=await t("@tanstack/react-router");function F(){const{definition:n}=N(),{apps:m,libraries:x}=n,c=n.settings.monorepo,r=o(m,[s=>s.name]),a=o(x,[s=>s.name]);return r.length===0&&a.length===0?e.jsxs(k,{className:"h-full",children:[e.jsxs(E,{children:[e.jsx(L,{variant:"icon",children:e.jsx(h,{})}),e.jsx(D,{children:"No Apps or Packages"}),e.jsx(w,{children:"You haven't created any apps or packages yet"})]}),e.jsx(v,{children:e.jsx(j,{trigger:e.jsx(b,{children:"Create New"})})})]}):e.jsxs("div",{className:"space-y-6 p-4",children:[e.jsxs("section",{className:"space-y-4",children:[e.jsx("h1",{children:"Apps"}),e.jsx("p",{className:"text-muted-foreground",children:"These are the apps that are defined in your project."}),r.length>0?e.jsx("div",{className:"mt-4 flex max-w-xl flex-col gap-4",children:r.map(s=>{const i=u.getAppDirectory(s,c);return e.jsx(p,{to:"/packages/apps/$key",params:{key:y.keyFromId(s.id)},children:e.jsxs(d,{className:"cursor-pointer p-4 transition-colors hover:bg-accent/50",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{children:s.name}),e.jsx(l,{variant:"secondary",children:s.type})]}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Location: ",i]})]})},s.id)})}):e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"No apps yet."})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{children:"Libraries"}),e.jsx("p",{className:"text-muted-foreground",children:"Library packages that can be shared across apps."}),a.length>0?e.jsx("div",{className:"mt-4 flex max-w-xl flex-col gap-4",children:a.map(s=>{const i=f.getLibraryDirectory(s,c);return e.jsx(p,{to:"/packages/libs/$key",params:{key:g.keyFromId(s.id)},children:e.jsxs(d,{className:"cursor-pointer p-4 transition-colors hover:bg-accent/50",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{children:s.name}),e.jsx(l,{variant:"secondary",children:s.type})]}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Location: ",i]})]})},s.id)})}):e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"No libraries yet."})]})]})}export{F as component};
//# sourceMappingURL=index-SyxeJyJ7.js.map
