{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The finder of FaqSplit: a search field, the topics as a row of buttons, and the first three questions as popular links.",
  "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 finder of FaqSplit: a search field, the topics as a row of buttons, and the first three questions as\n * popular links.\n */\nimport { Fragment, type ReactNode } from \"react\";\nimport { Button, Group, List, ListItem, Stack, Text } from \"../compose\";\nimport { MenuEntry } from \"../components/menu-entry\";\nimport { SearchField } from \"../components/search-field\";\nimport type { Question, FaqSplitLabels } from \"../blocks/faq-split.types\";\nimport type { FaqTab } from \"../blocks/faq-list.types\";\n\nexport type FaqFinderProps = {\n  items: Question[];\n  labels: FaqSplitLabels;\n  topics: FaqTab[];\n};\n\nexport function FaqFinder({ items, labels, topics }: FaqFinderProps) {\n  return (\n    <Stack gap=\"6\" align=\"stretch\" data-slot=\"faq-finder\">\n      <SearchField label={labels.search} placeholder={labels.search} value={(labels.query ?? \"\")} />\n      <Group gap=\"2\" className=\"flex-wrap\">\n        {(topics ?? []).map((t) => (\n          <Button key={t.id} variant=\"outline\" size=\"sm\" data-value={t.value}>\n            {t.title}\n          </Button>\n        ))}\n      </Group>\n      <Stack gap=\"2\">\n        <Text size=\"sm\" weight=\"semibold\">\n          {labels.popular}\n        </Text>\n        <List className=\"m-0 flex list-none flex-col gap-2 p-0\">\n          {(items ?? []).map((q, i) => (\n            <Fragment key={q.id}>\n              {(i < 3) ? (\n                <ListItem data-slot=\"faq-popular\">\n                  <MenuEntry href={q.href} className=\"text-sm font-medium\" size=\"sm\">\n                    {q.question}\n                  </MenuEntry>\n                </ListItem>\n              ) : null}\n            </Fragment>\n          ))}\n        </List>\n      </Stack>\n    </Stack>\n  );\n}\n",
      "path": "components/faq-finder.tsx",
      "target": "components/faq-finder.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "faq-finder",
  "registryDependencies": [
    "compose",
    "faq-list",
    "faq-split",
    "menu-entry",
    "search-field",
    "utils"
  ],
  "runtime": "react",
  "title": "Faq Finder",
  "type": "registry:component"
}
