{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "core",
  "title": "OIDC Core",
  "description": "A starter policy form: GitHub Actions and Vercel behind a toggle picker, each form with its own submit. The file is yours — add providers, swap the picker, and wire onSubmit to your storage. The builder at the homepage generates this file for any provider combination.",
  "registryDependencies": [
    "https://ui.shadcn.com/oidc/r/policy.json",
    "https://ui.shadcn.com/oidc/r/provider-github.json",
    "https://ui.shadcn.com/oidc/r/provider-vercel.json",
    "https://ui.shadcn.com/oidc/r/picker.json",
    "alert"
  ],
  "files": [
    {
      "path": "registry/oidc/components/policy-form.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { GithubIcon, GithubPolicyForm } from \"@/components/oidc/provider-github\"\nimport { ProviderPicker } from \"@/components/oidc/picker\"\nimport { VercelIcon, VercelPolicyForm } from \"@/components/oidc/provider-vercel\"\nimport { Alert, AlertTitle } from \"@/components/ui/alert\"\nimport type { OidcPolicy } from \"@/lib/oidc/policy\"\n\n// This file is yours: add or remove providers by editing PROVIDERS and the forms below.\nconst PROVIDERS = [\n  { label: \"GitHub Actions\", value: \"github\", icon: GithubIcon },\n  { label: \"Vercel\", value: \"vercel\", icon: VercelIcon },\n]\n\nfunction OidcPolicyForm() {\n  const [provider, setProvider] = React.useState(\"github\")\n  const [saved, setSaved] = React.useState(false)\n\n  const onSubmit = (policy: OidcPolicy) => {\n    // Replace with your save, e.g. the savePolicy server action.\n    console.log(provider, policy)\n    setSaved(true)\n  }\n\n  return (\n    <div className=\"flex flex-col gap-6\">\n      <ProviderPicker\n        providers={PROVIDERS}\n        value={provider}\n        onValueChange={setProvider}\n      />\n      {saved ? (\n        <Alert>\n          <AlertTitle>Policy saved.</AlertTitle>\n        </Alert>\n      ) : null}\n      {provider === \"github\" ? <GithubPolicyForm onSubmit={onSubmit} /> : null}\n      {provider === \"vercel\" ? <VercelPolicyForm onSubmit={onSubmit} /> : null}\n    </div>\n  )\n}\n\nexport { OidcPolicyForm }\n",
      "type": "registry:component",
      "target": "@components/oidc/policy-form.tsx"
    }
  ],
  "categories": [
    "auth",
    "forms"
  ],
  "type": "registry:block"
}