{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Features as tabs; the chosen one fills the panel beside or below the tab list.",
  "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  Features behind a tab list: the chosen tab shows its text and a picture. The page keeps the chosen tab\n  (`active`, empty for the first) and updates it on the `select` event. Axes: panel (split: text beside the\n  picture, stack: picture below), tone, density.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { Feature } from \"./feature-grid.types\";\n\n  export type FeatureTabsProps = {\n    id: string;\n    title: string;\n    features: Feature[];\n    empty?: string;\n    tabsLabel: string;\n    active?: string;\n    panel?: \"split\" | \"stack\";\n    tone?: \"default\" | \"muted\";\n    density?: \"default\" | \"compact\";\n    landmarkLabel?: string;\n    onselect?: (id: string) => void;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Grid from \"../compose/Grid.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import Title from \"../compose/Title.svelte\";\n  import EmptyState from \"../components/empty-state.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import SectionFrame from \"../components/section-frame.svelte\";\n  import Switcher from \"../components/switcher.svelte\";\n  import SwitcherItem from \"../components/switcher-item.svelte\";\n\n  let {\n    id,\n    title,\n    features,\n    empty = \"\",\n    tabsLabel,\n    active = \"\",\n    panel = \"split\",\n    tone = \"default\",\n    density = \"default\",\n    landmarkLabel,\n    onselect,\n  }: FeatureTabsProps = $props();\n</script>\n\n<SectionFrame id={id} title={title} tone={tone} density={density} landmarkLabel={landmarkLabel}>\n  {#if ((features?.length ?? 0) === 0)}\n    <EmptyState icon=\"layout-grid\" title={empty} />\n  {:else}\n    <Stack gap=\"6\" align=\"stretch\">\n      <Switcher label={tabsLabel} class=\"w-fit max-w-full flex-wrap\">\n        {#each features as f, i (f.id)}\n          <SwitcherItem\n            active={((f.id === active) || (((active as string) === \"\") && (i === 0)))}\n            onclick={() => onselect?.(f.id)}\n          >\n            {f.title}\n          </SwitcherItem>\n        {/each}\n      </Switcher>\n      {#each features as f, i (f.id)}\n        {#if ((f.id === active) || (((active as string) === \"\") && (i === 0)))}\n          <Grid\n            cols={(((panel as string) === \"split\") ? \"1-2\" : \"1\")}\n            class=\"items-center gap-8\"\n            role=\"tabpanel\"\n            data-slot=\"tab-panel\"\n          >\n            <Stack gap=\"4\">\n              <LucideIcon name={f.icon} size={24} />\n              <Title as={3} size=\"2xl\" weight=\"bold\">\n                {f.title}\n              </Title>\n              <Text size=\"base\" class=\"text-muted-foreground\">\n                {f.text}\n              </Text>\n            </Stack>\n            <MediaFrame alt={f.title} src={f.image} ratio=\"4/3\" />\n          </Grid>\n        {/if}\n      {/each}\n    </Stack>\n  {/if}\n</SectionFrame>\n",
      "path": "blocks/feature-tabs.svelte",
      "target": "blocks/feature-tabs.svelte"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "svelte",
      "block"
    ]
  },
  "name": "feature-tabs",
  "registryDependencies": [
    "empty-state",
    "feature-grid",
    "grid",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "switcher",
    "switcher-item",
    "text",
    "title",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Feature Tabs",
  "type": "registry:block"
}
