{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "account-settings",
  "title": "Account Settings",
  "description": "A container component that displays account settings including user profile, change email, and plugin-contributed account cards (e.g. appearance from the theme plugin, multi-session accounts).",
  "dependencies": [
    "@better-auth-ui/react@latest",
    "@better-auth-ui/core@latest"
  ],
  "registryDependencies": [
    "https://better-auth-ui.com/r/radix-nova/user-profile.json",
    "https://better-auth-ui.com/r/radix-nova/change-email.json"
  ],
  "files": [
    {
      "path": "src/components/auth/settings/account/account-settings.tsx",
      "content": "\"use client\"\n\nimport { useAuth } from \"@better-auth-ui/react\"\nimport type { ComponentProps } from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { ChangeEmail } from \"./change-email\"\nimport { UserProfile } from \"./user-profile\"\n\nexport type AccountSettingsProps = {\n  className?: string\n}\n\n/**\n * Renders the account settings layout.\n *\n * Uses `emailAndPassword` and `plugins` from `useAuth()` to conditionally\n * show sections:\n * - `UserProfile` always renders.\n * - The change-email card renders when `emailAndPassword?.enabled` is truthy\n *   or the `magicLink` plugin is registered, and a plugin may replace it via\n *   `cardOverrides.account.changeEmail` (the email-OTP plugin swaps in its\n *   code-based flow).\n * - Plugin-contributed account cards are rendered via the plugins array\n *   (e.g. `Appearance` from the theme plugin, multi-session accounts).\n */\nexport function AccountSettings({\n  className,\n  ...props\n}: AccountSettingsProps & ComponentProps<\"div\">) {\n  const { emailAndPassword, plugins } = useAuth()\n\n  const hasMagicLink = plugins.some((plugin) => plugin.id === \"magicLink\")\n\n  const ChangeEmailOverride = plugins.find(\n    (plugin) => plugin.cardOverrides?.account?.changeEmail\n  )?.cardOverrides?.account?.changeEmail\n  const ChangeEmailCard = ChangeEmailOverride ?? ChangeEmail\n\n  // A plugin that replaces the card brings its own way to confirm the change,\n  // so it can stand on its own without password or magic-link auth.\n  const showChangeEmail =\n    emailAndPassword?.enabled || hasMagicLink || Boolean(ChangeEmailOverride)\n\n  return (\n    <div\n      className={cn(\"flex w-full flex-col gap-4 md:gap-6\", className)}\n      {...props}\n    >\n      <UserProfile />\n      {showChangeEmail && <ChangeEmailCard />}\n      {plugins.flatMap(\n        (plugin) =>\n          plugin.accountCards?.map((Card, index) => (\n            <Card key={`${plugin.id}-${index.toString()}`} />\n          )) ?? []\n      )}\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/auth/settings/account/account-settings.tsx"
    }
  ],
  "type": "registry:component"
}