{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "accordion-20",
  "title": "Nested accordion with icons",
  "description": "Questions and follow-up questions, each with its own icon.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/accordion.json",
    "https://ui.ndekocode.dev/r/collapsible.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/recipes.json",
    "https://ui.ndekocode.dev/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/components/accordion/accordion-20.tsx",
      "content": "import {\n  CalendarIcon,\n  ChevronDownIcon,\n  ClockIcon,\n  CreditCardIcon,\n  DownloadIcon,\n  EyeIcon,\n  FileSpreadsheetIcon,\n  FolderPlusIcon,\n  type Icon,\n  LockIcon,\n  RefreshCwIcon,\n  BoxIcon,\n  UserRoundPlusIcon,\n  UsersIcon,\n} from '@/registry/ndeko/lib/icons';\nimport { FOCUS_RING } from '@/registry/ndeko/lib/recipes';\nimport {\n  Accordion,\n  AccordionContent,\n  AccordionItem,\n  AccordionTrigger,\n} from '@/registry/ndeko/ui/accordion';\nimport {\n  Collapsible,\n  CollapsibleContent,\n  CollapsibleTrigger,\n} from '@/registry/ndeko/ui/collapsible';\n\ntype Answer = {\n  title: string;\n  content: string;\n  icon: Icon;\n  isOpenByDefault?: boolean;\n};\n\ntype Question = {\n  value: string;\n  title: string;\n  icon: Icon;\n  answers: Answer[];\n};\n\nconst QUESTIONS: Question[] = [\n  {\n    value: 'free-plan',\n    title: 'What is included in the free plan?',\n    icon: BoxIcon,\n    answers: [\n      {\n        title: 'Is there a limit on teammates?',\n        content:\n          'No. Every plan lets you invite as many teammates as you need.',\n        icon: UsersIcon,\n      },\n      {\n        title: 'What happens at the fourth project?',\n        content:\n          'You are asked to upgrade before creating it. Existing projects stay as they are.',\n        icon: FolderPlusIcon,\n      },\n    ],\n  },\n  {\n    value: 'change-plan',\n    title: 'Can I change my plan later?',\n    icon: CreditCardIcon,\n    answers: [\n      {\n        title: 'Are upgrades prorated?',\n        content:\n          'Yes. You pay only for the days left in the current billing period.',\n        icon: CalendarIcon,\n      },\n      {\n        title: 'Can I switch to yearly billing?',\n        content:\n          'Yes, at any time from the Billing page. The switch applies at the next renewal.',\n        icon: RefreshCwIcon,\n      },\n    ],\n  },\n  {\n    value: 'export',\n    title: 'How do I export my data?',\n    icon: DownloadIcon,\n    answers: [\n      {\n        title: 'Which formats are available?',\n        content:\n          'CSV for projects and tasks, and the original files for attachments.',\n        icon: FileSpreadsheetIcon,\n        isOpenByDefault: true,\n      },\n      {\n        title: 'Can exports run on a schedule?',\n        content:\n          'Yes. A weekly or monthly export can be sent to the workspace owner by email.',\n        icon: ClockIcon,\n      },\n    ],\n  },\n  {\n    value: 'access',\n    title: 'Who can see my projects?',\n    icon: EyeIcon,\n    answers: [\n      {\n        title: 'Can I share a project with a guest?',\n        content: 'Yes. A guest sees only the projects they are invited to.',\n        icon: UserRoundPlusIcon,\n      },\n      {\n        title: 'Can I make a project private?',\n        content:\n          'Yes. A private project is hidden from everyone who is not a member.',\n        icon: LockIcon,\n      },\n    ],\n  },\n];\n\nconst ANSWER_TRIGGER = [\n  'group/answer flex w-full cursor-pointer gap-2 rounded-md text-left text-[13px] font-medium text-foreground',\n  FOCUS_RING,\n].join(' ');\n\nfunction AnswerRow({ answer }: { answer: Answer }) {\n  return (\n    <Collapsible\n      defaultOpen={answer.isOpenByDefault}\n      className='hairline-t border-border py-3 ps-6 pe-4'\n    >\n      <CollapsibleTrigger className={ANSWER_TRIGGER}>\n        <ChevronDownIcon className='text-muted-foreground mt-0.5 size-4 shrink-0 transition-[rotate] duration-200 ease-(--ease-out-strong) group-data-panel-open/answer:rotate-180' />\n        <span className='flex items-center gap-3'>\n          <answer.icon className='text-muted-foreground size-4 shrink-0' />\n          {answer.title}\n        </span>\n      </CollapsibleTrigger>\n      <CollapsibleContent>\n        <p className='ps-6 pt-1'>{answer.content}</p>\n      </CollapsibleContent>\n    </Collapsible>\n  );\n}\n\nexport default function Accordion20() {\n  return (\n    <Accordion defaultValue={['export']}>\n      {QUESTIONS.map((question) => (\n        <AccordionItem key={question.value} value={question.value}>\n          <AccordionTrigger className='justify-start gap-3 [&>svg]:-order-1'>\n            <span className='flex items-center gap-3'>\n              <question.icon className='text-muted-foreground size-4 shrink-0' />\n              {question.title}\n            </span>\n          </AccordionTrigger>\n          <AccordionContent className='pb-0'>\n            {question.answers.map((answer) => (\n              <AnswerRow key={answer.title} answer={answer} />\n            ))}\n          </AccordionContent>\n        </AccordionItem>\n      ))}\n    </Accordion>\n  );\n}\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "components",
    "accordion"
  ],
  "type": "registry:component"
}