{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Hero Split Media 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  What HeroSplit shows beside the text: a picture, a picture with a floating card, a grid of four pictures with\n  captions, or a picture with two plan cards floating over it.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { HeroContent } from \"../blocks/hero-split.types\";\n\n  export type HeroSplitMediaProps = {\n    content: HeroContent;\n    alt: string;\n    image?: string;\n    media?: \"picture\" | \"card\" | \"grid\" | \"plans\";\n  };\n</script>\n\n<script lang=\"ts\">\n  import Box from \"../compose/Box.svelte\";\n  import Group from \"../compose/Group.svelte\";\n  import LucideIcon from \"../icons/LucideIcon.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import Text from \"../compose/Text.svelte\";\n  import FigureBlock from \"../components/figure-block.svelte\";\n  import MediaFrame from \"../components/media-frame.svelte\";\n  import OfferMedia from \"../components/offer-media.svelte\";\n  import { cn } from \"../utils\";\n\n  let { content, alt, image, media = \"picture\" }: HeroSplitMediaProps = $props();\n</script>\n\n{#if ((media as string) === \"picture\")}\n  <MediaFrame alt={alt} src={image} ratio=\"4/3\" />\n{/if}\n{#if ((media as string) === \"card\")}\n  <OfferMedia alt={alt} image={image} card={content.card} />\n{/if}\n{#if (((media as string) === \"grid\") && ((content.features?.length ?? 0) > 0))}\n  <Box class=\"grid grid-cols-2 gap-4\" data-slot=\"hero-grid\">\n    {#each content.features as f, i (f.id)}\n      {#if (i < 4)}\n        <FigureBlock class=\"flex flex-col gap-2\" testid=\"hero-tile\">\n          <MediaFrame alt={f.title} src={f.image} ratio=\"1/1\" />\n          <Text size=\"xs\" class=\"text-muted-foreground\">\n            {f.title}\n          </Text>\n        </FigureBlock>\n      {/if}\n    {/each}\n  </Box>\n{/if}\n{#if (((media as string) === \"plans\") && ((content.plans?.length ?? 0) > 0))}\n  <Box class=\"relative\" data-slot=\"hero-media\">\n    <MediaFrame alt={alt} src={image} ratio=\"4/3\" />\n    {#each content.plans as p, i (p.id)}\n      {#if (i < 2)}\n        <Stack\n          gap=\"2\"\n          class={cn(\n            \"absolute w-48 rounded bg-card p-4 shadow-lg\",\n            ((i === 0) ? \"top-8 left-4\" : \"right-4 bottom-8\")\n          )}\n          data-slot=\"hero-plan\"\n        >\n          <Text size=\"sm\" weight=\"semibold\">\n            {p.name}\n          </Text>\n          <Group gap=\"2\" align=\"center\">\n            <LucideIcon name=\"check\" size={16} />\n            <Text size=\"xs\" class=\"text-muted-foreground\">\n              {p.tagline}\n            </Text>\n          </Group>\n        </Stack>\n      {/if}\n    {/each}\n  </Box>\n{/if}\n",
      "path": "components/hero-split-media.svelte",
      "target": "components/hero-split-media.svelte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "hero-split-media",
  "registryDependencies": [
    "box",
    "figure-block",
    "group",
    "hero-split",
    "lucide-icon",
    "media-frame",
    "offer-media",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Hero Split Media",
  "type": "registry:component"
}
