{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "App Main component",
  "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-->\n<script lang=\"ts\">\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</script>\n\n<script setup lang=\"ts\">\nimport Box from \"../compose/Box.vue\";\nimport Grid from \"../compose/Grid.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Title from \"../compose/Title.vue\";\nimport BarChart from \"../components/bar-chart.vue\";\nimport Panel from \"../components/panel.vue\";\nimport StatTile from \"../components/stat-tile.vue\";\nimport Timeline from \"../components/timeline.vue\";\nimport { tpl } from \"../utils\";\n\nconst {\n  id,\n  title,\n  metrics,\n  chart,\n  activity,\n  cols = \"1-2\",\n  density = \"default\",\n} = defineProps<AppMainProps>();\n</script>\n\n<template>\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    <Grid v-if=\"((metrics?.length ?? 0) > 0)\" :cols=\"cols\" class=\"gap-4\" data-slot=\"items\">\n      <Box v-for=\"m in metrics\" :key=\"m.id\" data-slot=\"item\">\n        <StatTile :label=\"m.label\" :value=\"m.value\" :icon=\"m.icon\" :hint=\"m.hint\" />\n      </Box>\n    </Grid>\n    <Grid v-if=\"activity\" cols=\"1-2\" class=\"items-stretch gap-4\">\n      <Panel\n        v-if=\"((chart.series?.length ?? 0) > 0)\"\n        :title=\"chart.title\"\n        :description=\"chart.text\"\n        :id=\"tpl('{0}-chart', id)\"\n        class=\"h-full\"\n      >\n        <BarChart :bars=\"chart.series\" :label=\"chart.summary\" :height=\"144\" />\n      </Panel>\n      <Panel\n        v-if=\"((activity?.events?.length ?? 0) > 0)\"\n        :title=\"activity?.title\"\n        :description=\"activity?.text\"\n        :id=\"tpl('{0}-feed', id)\"\n        class=\"h-full\"\n      >\n        <Timeline :items=\"activity?.events\" />\n      </Panel>\n    </Grid>\n    <Panel\n      v-else-if=\"((chart.series?.length ?? 0) > 0)\"\n      :title=\"chart.title\"\n      :description=\"chart.text\"\n      :id=\"tpl('{0}-chart', id)\"\n      class=\"h-full\"\n    >\n      <BarChart :bars=\"chart.series\" :label=\"chart.summary\" :height=\"144\" />\n    </Panel>\n  </Stack>\n</template>\n",
      "path": "components/app-main.vue",
      "target": "components/app-main.vue"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "vue",
      "component"
    ]
  },
  "name": "app-main",
  "registryDependencies": [
    "activity-feed",
    "bar-chart",
    "box",
    "chart-panel",
    "dashboard-overview",
    "grid",
    "metric-row",
    "panel",
    "stack",
    "stat-tile",
    "timeline",
    "title",
    "utils"
  ],
  "runtime": "vue",
  "title": "App Main",
  "type": "registry:component"
}
