{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Two sides of the same points: how it was and how it is, as two cards or as rows.",
  "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 * Two columns that set life without the product against life with it, point by point. Axes: layout (cards: two\n * cards, rows: one row per point), icons (show, hide), tone, density.\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Card, CardContent, Grid, Group, List, ListItem, Stack, Text, Title } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { EmptyState } from \"../components/empty-state\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn } from \"../utils\";\nimport type { Contrast, BeforeAfterLabels } from \"./before-after.types\";\n\nexport type BeforeAfterProps = {\n  id: string;\n  title: string;\n  points: Contrast[];\n  empty?: string;\n  labels: BeforeAfterLabels;\n  layout?: \"cards\" | \"rows\";\n  icons?: \"show\" | \"hide\";\n  tone?: \"default\" | \"muted\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n\nexport function BeforeAfter({\n  id,\n  title,\n  points,\n  empty = \"\",\n  labels,\n  layout = \"cards\",\n  icons = \"show\",\n  tone = \"default\",\n  density = \"default\",\n  landmarkLabel,\n}: BeforeAfterProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n      {((points?.length ?? 0) === 0) ? (\n        <EmptyState icon=\"git-compare\" title={empty} />\n      ) : ((layout as string) === \"cards\") ? (\n        <Grid cols=\"1-2\" class=\"items-stretch gap-4\" data-slot=\"sides\">\n          <Card\n            variant=\"muted\"\n            class={cn(\"h-full\", (((density as string) === \"compact\") ? \"gap-4 p-4\" : \"\"))}\n            data-side=\"before\"\n          >\n            <CardContent class=\"flex flex-col gap-4\">\n              <Title as={3} size=\"xl\" weight=\"bold\">\n                {labels.before}\n              </Title>\n              <List class=\"m-0 flex list-none flex-col gap-4 p-0\">\n                <For each={points ?? []}>{(p) => (\n                  <ListItem class=\"flex items-start gap-4\" data-slot=\"item\">\n                    {((icons as string) === \"show\") ? (\n                      <LucideIcon name=\"x\" size={16} class=\"h-lh shrink-0 text-sm\" />\n                    ) : null}\n                    <Text size=\"sm\">\n                      {p.before}\n                    </Text>\n                  </ListItem>\n                )}</For>\n              </List>\n            </CardContent>\n          </Card>\n          <Card\n            variant=\"default\"\n            class={cn(\"h-full\", (((density as string) === \"compact\") ? \"gap-4 p-4\" : \"\"))}\n            data-side=\"after\"\n          >\n            <CardContent class=\"flex flex-col gap-4\">\n              <Title as={3} size=\"xl\" weight=\"bold\">\n                {labels.after}\n              </Title>\n              <List class=\"m-0 flex list-none flex-col gap-4 p-0\">\n                <For each={points ?? []}>{(p) => (\n                  <ListItem class=\"flex items-start gap-4\" data-slot=\"item\">\n                    {((icons as string) === \"show\") ? (\n                      <LucideIcon name=\"check\" size={16} class=\"h-lh shrink-0 text-sm\" />\n                    ) : null}\n                    <Text size=\"sm\">\n                      {p.after}\n                    </Text>\n                  </ListItem>\n                )}</For>\n              </List>\n            </CardContent>\n          </Card>\n        </Grid>\n      ) : (\n        <Stack gap=\"2\" align=\"stretch\" data-slot=\"rows\">\n          <For each={points ?? []}>{(p) => (\n            <Grid\n              cols=\"1-3\"\n              class={cn(\"items-center gap-4\", \"rounded bg-card inset-ring inset-ring-border p-4\")}\n              data-slot=\"item\"\n            >\n              <Text size=\"base\" weight=\"semibold\">\n                {p.title}\n              </Text>\n              <Group gap=\"2\" align=\"start\">\n                {((icons as string) === \"show\") ? (\n                  <LucideIcon name=\"x\" size={16} class=\"h-lh shrink-0 text-sm text-muted-foreground\" />\n                ) : null}\n                <Text size=\"sm\" class=\"text-muted-foreground\">\n                  {p.before}\n                </Text>\n              </Group>\n              <Group gap=\"2\" align=\"start\">\n                {((icons as string) === \"show\") ? (\n                  <LucideIcon name=\"check\" size={16} class=\"h-lh shrink-0 text-sm text-primary\" />\n                ) : null}\n                <Text size=\"sm\" weight=\"semibold\">\n                  {p.after}\n                </Text>\n              </Group>\n            </Grid>\n          )}</For>\n        </Stack>\n      )}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/before-after.tsx",
      "target": "blocks/before-after.tsx"
    },
    {
      "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\nexport type Contrast = {\n  id: string;\n  title: string;\n  before: string;\n  after: string;\n};\n\nexport type BeforeAfterLabels = {\n  before: string;\n  after: string;\n};\n",
      "path": "blocks/before-after.types.ts",
      "target": "blocks/before-after.types.ts"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "solid",
      "block"
    ]
  },
  "name": "before-after",
  "registryDependencies": [
    "compose",
    "empty-state",
    "lucide-icon",
    "section-frame",
    "utils"
  ],
  "runtime": "solid",
  "title": "Before After",
  "type": "registry:block"
}
