{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The main column of AppShell: the heading, the metric tiles, and the chart panel (beside the activity panel when `activity` is given).",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * The main column of AppShell: the heading, the metric tiles, and the chart panel (beside the activity panel\n * when `activity` is given).\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Box, Grid, Stack, Title } from \"../compose\";\nimport { BarChart } from \"../components/bar-chart\";\nimport { Panel } from \"../components/panel\";\nimport { StatTile } from \"../components/stat-tile\";\nimport { Timeline } from \"../components/timeline\";\nimport { tpl } from \"../utils\";\nimport type { Metric } from \"../blocks/metric-row.types\";\nimport type { Point } from \"../blocks/chart-panel.types\";\nimport type { Event } from \"../blocks/activity-feed.types\";\nimport type { OverviewChart, OverviewActivity } from \"../blocks/dashboard-overview.types\";\n\nexport type AppMainProps = {\n  id: string;\n  title: string;\n  metrics: Metric[];\n  chart: OverviewChart;\n  activity?: OverviewActivity;\n  cols?: \"1-2\" | \"1-4\";\n  density?: \"default\" | \"compact\";\n};\n\nexport function AppMain({\n  id,\n  title,\n  metrics,\n  chart,\n  activity,\n  cols = \"1-2\",\n  density = \"default\",\n}: AppMainProps) {\n  return (\n    <Stack\n      gap={(((density as string) === \"compact\") ? \"4\" : \"6\")}\n      align=\"stretch\"\n      class=\"min-w-0\"\n      data-slot=\"app-main\"\n    >\n      <Title as={2} size=\"2xl\" weight=\"bold\" id={tpl(\"{0}-title\", id)}>\n        {title}\n      </Title>\n      {((metrics?.length ?? 0) > 0) ? (\n        <Grid cols={cols} class=\"gap-4\" data-slot=\"items\">\n          <For each={metrics ?? []}>{(m) => (\n            <Box data-slot=\"item\">\n              <StatTile label={m.label} value={m.value} icon={m.icon} hint={m.hint} />\n            </Box>\n          )}</For>\n        </Grid>\n      ) : null}\n      {activity ? (\n        <Grid cols=\"1-2\" class=\"items-stretch gap-4\">\n          {((chart.series?.length ?? 0) > 0) ? (\n            <Panel title={chart.title} description={chart.text} id={tpl(\"{0}-chart\", id)} class=\"h-full\">\n              <BarChart bars={chart.series} label={chart.summary} height={144} />\n            </Panel>\n          ) : null}\n          {((activity?.events?.length ?? 0) > 0) ? (\n            <Panel title={activity?.title} description={activity?.text} id={tpl(\"{0}-feed\", id)} class=\"h-full\">\n              <Timeline items={activity?.events} />\n            </Panel>\n          ) : null}\n        </Grid>\n      ) : ((chart.series?.length ?? 0) > 0) ? (\n        <Panel title={chart.title} description={chart.text} id={tpl(\"{0}-chart\", id)} class=\"h-full\">\n          <BarChart bars={chart.series} label={chart.summary} height={144} />\n        </Panel>\n      ) : null}\n    </Stack>\n  );\n}\n",
      "path": "components/app-main.tsx",
      "target": "components/app-main.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "app-main",
  "registryDependencies": [
    "activity-feed",
    "bar-chart",
    "chart-panel",
    "compose",
    "dashboard-overview",
    "metric-row",
    "panel",
    "stat-tile",
    "timeline",
    "utils"
  ],
  "runtime": "solid",
  "title": "App Main",
  "type": "registry:component"
}
