{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faqs-5",
  "title": "Searchable FAQ With Category Tabs",
  "description": "Help-center FAQ section with a live search input and General, Billing, and Security tabs showing match counts plus an empty state for no results.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "accordion",
    "empty",
    "input",
    "tabs"
  ],
  "files": [
    {
      "path": "registry/blocks/faqs/5/faqs-block.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Accordion,\n  AccordionContent,\n  AccordionItem,\n  AccordionTrigger,\n} from \"@/components/ui/accordion\"\nimport { Input } from \"@/components/ui/input\"\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\nimport {\n  Empty,\n  EmptyDescription,\n  EmptyHeader,\n  EmptyMedia,\n  EmptyTitle,\n} from \"@/components/ui/empty\"\nimport { cn } from \"@/lib/utils\"\nimport { IconPlaceholder } from \"@/components/icons/icon-placeholder\"\n\ntype IconProps = { className?: string; size?: number | string }\n\ntype IconRenderer = (props: IconProps) => React.ReactNode\n\ntype Faq = {\n  q: string\n  a: string\n}\n\ntype FaqCategory = {\n  id: string\n  label: string\n  icon: IconRenderer\n  items: Faq[]\n}\n\nconst categories: FaqCategory[] = [\n  {\n    id: \"general\",\n    label: \"General\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"HelpCircle\"\n        tabler=\"IconHelpCircle\"\n        hugeicons=\"HelpCircleIcon\"\n        phosphor=\"Question\"\n        remixicon=\"RiQuestionLine\"\n        {...p}\n      />\n    ),\n    items: [\n      {\n        q: \"How do I get started with Acme?\",\n        a: \"Create a free account, set up your first workspace, and follow the onboarding checklist. Most teams are up and running in under five minutes.\",\n      },\n      {\n        q: \"Can I use Acme across multiple projects?\",\n        a: \"Yes. Every account supports unlimited projects, organised into separate workspaces with per-workspace access controls.\",\n      },\n      {\n        q: \"Do you offer a free plan?\",\n        a: \"Acme is free for up to three members. You can upgrade at any time as your team grows, with no migration required.\",\n      },\n      {\n        q: \"Which integrations are available?\",\n        a: \"Acme connects with Slack, GitHub, Linear, and over 40 other tools. You can also build custom workflows with our public API and webhooks.\",\n      },\n    ],\n  },\n  {\n    id: \"billing\",\n    label: \"Billing\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"CreditCard\"\n        tabler=\"IconCreditCard\"\n        hugeicons=\"CreditCardIcon\"\n        phosphor=\"CreditCard\"\n        remixicon=\"RiBankCardLine\"\n        {...p}\n      />\n    ),\n    items: [\n      {\n        q: \"What payment methods do you accept?\",\n        a: \"We accept all major credit and debit cards, plus ACH bank transfers for annual plans. Invoiced billing is available for Enterprise customers.\",\n      },\n      {\n        q: \"How do I cancel my subscription?\",\n        a: \"Cancel any time from Billing in your account settings. Your plan stays active until the end of the current period and will not renew.\",\n      },\n      {\n        q: \"Can I get a refund?\",\n        a: \"Annual plans include a 30-day money-back guarantee. Reach out to support within 30 days of purchase for a full, no-questions-asked refund.\",\n      },\n      {\n        q: \"Do you offer discounts for non-profits?\",\n        a: \"We provide a 40% discount for verified non-profits. Send us your registration documents and our team will apply the credit to your account.\",\n      },\n    ],\n  },\n  {\n    id: \"security\",\n    label: \"Security\",\n    icon: (p: IconProps) => (\n      <IconPlaceholder\n        lucide=\"ShieldCheck\"\n        tabler=\"IconShieldCheck\"\n        hugeicons=\"Shield01Icon\"\n        phosphor=\"ShieldCheck\"\n        remixicon=\"RiShieldCheckLine\"\n        {...p}\n      />\n    ),\n    items: [\n      {\n        q: \"How is my data protected?\",\n        a: \"All data is encrypted in transit with TLS 1.3 and at rest with AES-256. We run continuous monitoring and undergo regular third-party audits.\",\n      },\n      {\n        q: \"Are you SOC 2 compliant?\",\n        a: \"Yes. Acme maintains SOC 2 Type II certification and is GDPR compliant. You can request our latest reports from the Trust Center.\",\n      },\n      {\n        q: \"Do you support single sign-on?\",\n        a: \"SAML and OIDC single sign-on are available on Business and Enterprise plans, alongside SCIM provisioning for automated user management.\",\n      },\n      {\n        q: \"Is my data portable?\",\n        a: \"Absolutely. Export all of your data as JSON or CSV from Settings at any time, with no restrictions and no exit fees.\",\n      },\n    ],\n  },\n]\n\nexport default function FaqsBlock() {\n  const [query, setQuery] = useState(\"\")\n  const normalized = query.trim().toLowerCase()\n\n  const filterItems = (items: Faq[]) =>\n    normalized.length === 0\n      ? items\n      : items.filter(\n          ({ q, a }) =>\n            q.toLowerCase().includes(normalized) ||\n            a.toLowerCase().includes(normalized)\n        )\n\n  return (\n    <section className=\"flex min-h-svh w-full items-start justify-center bg-muted/30 px-6 py-16 text-foreground\">\n      <div className=\"mx-auto flex w-full max-w-3xl flex-col items-center gap-8\">\n        <div className=\"flex flex-col items-center gap-3 text-center\">\n          <span className=\"text-xs font-semibold tracking-widest text-muted-foreground uppercase\">\n            Help center\n          </span>\n          <h2 className=\"font-heading text-3xl font-bold tracking-tight sm:text-4xl\">\n            How can we help?\n          </h2>\n          <p className=\"max-w-md text-sm leading-relaxed text-muted-foreground\">\n            Search across every topic or browse by category to find answers\n            about Acme.\n          </p>\n        </div>\n\n        <div className=\"relative w-full max-w-md\">\n          <IconPlaceholder\n            lucide=\"Search\"\n            tabler=\"IconSearch\"\n            hugeicons=\"SearchIcon\"\n            phosphor=\"MagnifyingGlass\"\n            remixicon=\"RiSearchLine\"\n            className=\"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground\"\n          />\n          <Input\n            type=\"search\"\n            value={query}\n            onChange={(e) => setQuery(e.target.value)}\n            placeholder=\"Search questions...\"\n            aria-label=\"Search frequently asked questions\"\n            className=\"pl-9 [&::-webkit-search-cancel-button]:appearance-none\"\n          />\n          {query.length > 0 && (\n            <button\n              type=\"button\"\n              onClick={() => setQuery(\"\")}\n              aria-label=\"Clear search\"\n              className=\"absolute top-1/2 right-2 flex size-6 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring\"\n            >\n              <IconPlaceholder\n                lucide=\"X\"\n                tabler=\"IconX\"\n                hugeicons=\"Cancel01Icon\"\n                phosphor=\"X\"\n                remixicon=\"RiCloseLine\"\n                className=\"size-4\"\n              />\n            </button>\n          )}\n        </div>\n\n        <Tabs defaultValue=\"general\" className=\"w-full\">\n          <TabsList className=\"mx-auto flex h-auto flex-wrap justify-center gap-1\">\n            {categories.map(({ id, label, icon: Icon, items }) => {\n              const count = filterItems(items).length\n              return (\n                <TabsTrigger key={id} value={id} className=\"gap-1.5\">\n                  <Icon data-icon=\"inline-start\" className=\"size-4\" />\n                  {label}\n                  <span\n                    className={cn(\n                      \"ml-0.5 inline-flex min-w-5 items-center justify-center rounded-full px-1 text-[10px] font-semibold tabular-nums\",\n                      count === 0\n                        ? \"bg-muted text-muted-foreground\"\n                        : \"bg-primary/10 text-primary\"\n                    )}\n                  >\n                    {count}\n                  </span>\n                </TabsTrigger>\n              )\n            })}\n          </TabsList>\n\n          {categories.map(({ id, items }) => {\n            const filtered = filterItems(items)\n            return (\n              <TabsContent key={id} value={id} className=\"mt-4\">\n                {filtered.length > 0 ? (\n                  <Accordion\n                    key={filtered[0].q}\n                    defaultValue={[filtered[0].q]}\n                    className=\"rounded-lg border border-border bg-card px-4\"\n                  >\n                    {filtered.map(({ q, a }) => (\n                      <AccordionItem key={q} value={q}>\n                        <AccordionTrigger className=\"py-4 text-sm font-medium\">\n                          {q}\n                        </AccordionTrigger>\n                        <AccordionContent className=\"pb-4 text-sm leading-relaxed text-muted-foreground\">\n                          {a}\n                        </AccordionContent>\n                      </AccordionItem>\n                    ))}\n                  </Accordion>\n                ) : (\n                  <Empty className=\"rounded-lg border border-dashed border-border bg-card py-12\">\n                    <EmptyHeader>\n                      <EmptyMedia variant=\"icon\">\n                        <IconPlaceholder\n                          lucide=\"Search\"\n                          tabler=\"IconSearch\"\n                          hugeicons=\"SearchIcon\"\n                          phosphor=\"MagnifyingGlass\"\n                          remixicon=\"RiSearchLine\"\n                          className=\"size-5\"\n                        />\n                      </EmptyMedia>\n                      <EmptyTitle>No matching questions</EmptyTitle>\n                      <EmptyDescription>\n                        Nothing in this category matches &ldquo;{query}&rdquo;.\n                        Try a different search term.\n                      </EmptyDescription>\n                    </EmptyHeader>\n                  </Empty>\n                )}\n              </TabsContent>\n            )\n          })}\n        </Tabs>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/blocks/faqs-5.tsx"
    }
  ],
  "meta": {
    "height": "692px",
    "tier": "free"
  },
  "categories": [
    "faqs"
  ],
  "type": "registry:block"
}