{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The frame of a signed-in app with a first screen: a sidebar, a top bar, or three panes.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/app-shell.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// AppShellProps are the props of AppShell; the values are the JSON shapes of the TypeScript props.\ntype AppShellProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tNav any `json:\"nav\"`\n\tUser any `json:\"user\"`\n\tSearch any `json:\"search\"`\n\tMetrics any `json:\"metrics\"`\n\tChart any `json:\"chart\"`\n\tActivity any `json:\"activity\"`\n\tLayout any `json:\"layout\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The frame of a signed-in app with a first screen in it. Axes: layout (sidebar: navigation on the left, top: a bar above the content, panes: a narrow navigation, a list and a detail), density. The collapse of the sidebar is a port contract.\ntempl AppShell(p AppShellProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vNav := p.Nav }}\n\t{{ vUser := p.User }}\n\t{{ vSearch := p.Search }}\n\t{{ vMetrics := p.Metrics }}\n\t{{ vChart := p.Chart }}\n\t{{ vActivity := p.Activity }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"sidebar\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"section\", Class: \"bg-background\", Attrs: uiutils.Attrs(\"aria-labelledby\", uiutils.Cond(uiutils.T(vLandmarkLabel), nil, uiutils.Tpl(\"{0}-title\", vId)), \"data-layout\", vLayout, \"aria-label\", vLandmarkLabel, \"data-slot\", \"app-shell\")}}) {\n\t\tif uiutils.Eq(vLayout, \"top\") {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"6\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t@NavBar(NavBarProps{Label: uiutils.Get(vNav, \"label\"), Brand: uiutils.Get(vNav, \"brand\"), Links: uiutils.Get(vNav, \"links\"), Current: uiutils.Get(vNav, \"current\"), Search: vSearch, Actions: map[string]any{\"mode\": \"none\"}, Layout: \"search\", LandmarkLabel: vLandmarkLabel})\n\t\t\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"mx-auto w-full max-w-6xl px-4\", \"pb-8\")), Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t\t\t@AppMain(AppMainProps{Id: vId, Title: vTitle, Metrics: vMetrics, Chart: vChart, Cols: \"1-4\", Activity: vActivity, Density: vDensity})\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"mx-auto w-full max-w-6xl px-4\", \"py-8\")), Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t\tif uiutils.Eq(vLayout, \"sidebar\") {\n\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1\", BoxProps: box.BoxProps{Class: \"items-start gap-6 md:grid-cols-[16rem_minmax(0,1fr)]\"}}) {\n\t\t\t\t\t\t@SidebarNav(SidebarNavProps{Label: uiutils.Get(vNav, \"label\"), Brand: uiutils.Get(vNav, \"brand\"), Links: uiutils.Get(vNav, \"links\"), Current: uiutils.Get(vNav, \"current\"), UserName: uiutils.Get(vUser, \"name\"), UserEmail: uiutils.Get(vUser, \"email\"), Density: vDensity, LandmarkLabel: vLandmarkLabel})\n\t\t\t\t\t\t@AppMain(AppMainProps{Id: vId, Title: vTitle, Metrics: vMetrics, Chart: vChart, Activity: vActivity, Density: vDensity})\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-3\", BoxProps: box.BoxProps{Class: \"items-start gap-4\"}}) {\n\t\t\t\t\t\t@SidebarNav(SidebarNavProps{Label: uiutils.Get(vNav, \"label\"), Brand: uiutils.Get(vNav, \"brand\"), Links: uiutils.Get(vNav, \"links\"), Current: uiutils.Get(vNav, \"current\"), UserName: uiutils.Get(vUser, \"name\"), UserEmail: uiutils.Get(vUser, \"email\"), Width: \"compact\", Density: vDensity, LandmarkLabel: vLandmarkLabel})\n\t\t\t\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vActivity, \"events\")), float64(0)) {\n\t\t\t\t\t\t\t@Panel(PanelProps{Title: uiutils.Get(vActivity, \"title\"), Description: uiutils.Get(vActivity, \"text\"), Id: uiutils.Tpl(\"{0}-list\", vId)}) {\n\t\t\t\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col gap-4 p-0\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\t\t\t\t\tfor _, vE := range uiutils.L(uiutils.Get(vActivity, \"events\")) {\n\t\t\t\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex flex-col gap-2\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vE, \"title\")) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vE, \"time\")) }\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@AppMain(AppMainProps{Id: vId, Title: vTitle, Metrics: vMetrics, Chart: vChart, Density: \"compact\"})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/app-shell.templ",
      "target": "blocks/app-shell.templ"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "layout",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "app-shell",
  "registryDependencies": [
    "app-main",
    "block",
    "container",
    "grid",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "nav-bar",
    "panel",
    "sidebar-nav",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "App Shell",
  "type": "registry:block"
}
