{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "login-onboarding-profile",
  "type": "registry:component",
  "title": "Login Onboarding Profile",
  "description": "A first-run profile setup in three steps with a progress bar: gradient avatar picker and name, a role chip, interest chips with a minimum, a live profile preview and a confetti finish.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "auth",
    "onboarding",
    "profile",
    "wizard",
    "chips",
    "avatar",
    "first run"
  ],
  "docs": "https://hyperblur.dev/effects/login-onboarding-profile",
  "files": [
    {
      "path": "registry/hyperblur/login-onboarding-profile.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/login-onboarding-profile.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoginOnboardingProfileValues {\n  avatar: number;\n  name: string;\n  role: string;\n  interests: string[];\n}\n\nexport interface LoginOnboardingProfileProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  workspace?: string;\n  title?: string;\n  avatars?: [string, string][];\n  roles?: string[];\n  interests?: string[];\n  minInterests?: number;\n  defaultValues?: Partial<LoginOnboardingProfileValues>;\n  defaultStep?: 0 | 1 | 2;\n  onStepChange?: (step: number) => void;\n  onSubmit?: (values: LoginOnboardingProfileValues) => boolean | void | Promise<boolean | void>;\n  finishCta?: { label: string; href: string };\n  accent?: string;\n}\n\nconst css = `\n.hb-qha {\n  --hb-qha-accent: #ec4899;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  padding: clamp(56px, 8cqw, 104px) 20px;\n}\n.hb-qha *, .hb-qha *::before, .hb-qha *::after { box-sizing: border-box; }\n.hb-qha::before { content: \"\"; position: absolute; inset: 0 0 auto; height: 420px; pointer-events: none; background: radial-gradient(ellipse 40% 70% at 25% 0%, color-mix(in srgb, var(--hb-qha-accent) 20%, transparent), transparent 70%), radial-gradient(ellipse 40% 70% at 80% 0%, rgba(99,102,241,.16), transparent 70%); }\n.hb-qha-inner { position: relative; max-width: 1040px; margin: 0 auto; }\n.hb-qha-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }\n.hb-qha-kicker { font-size: 13px; color: #8f8f8f; }\n.hb-qha-title { margin: 6px 0 0; font-size: clamp(26px, 3.8cqw, 38px); letter-spacing: -.03em; line-height: 1.1; font-weight: 600; }\n.hb-qha-count { font-size: 13px; color: #8f8f8f; font-variant-numeric: tabular-nums; }\n.hb-qha-prog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 28px; list-style: none; padding: 0; }\n.hb-qha-prog li { display: grid; gap: 8px; font-size: 12.5px; color: #6f6f6f; transition: color .3s; }\n.hb-qha-prog li[data-state=\"current\"], .hb-qha-prog li[data-state=\"done\"] { color: #ededed; }\n.hb-qha-track { height: 4px; border-radius: 4px; background: #1f1f1f; overflow: hidden; }\n.hb-qha-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hb-qha-accent), color-mix(in srgb, var(--hb-qha-accent) 50%, #a78bfa)); transform-origin: left; transform: scaleX(0); transition: transform .6s cubic-bezier(.2,.7,.2,1); }\n.hb-qha-prog li[data-state=\"done\"] .hb-qha-track i { transform: scaleX(1); }\n.hb-qha-prog li[data-state=\"current\"] .hb-qha-track i { transform: scaleX(.5); }\n.hb-qha-grid { display: grid; gap: 20px; }\n.hb-qha-preview { position: relative; border-radius: 22px; border: 1px solid rgba(255,255,255,.08); background: linear-gradient(180deg, #131313, #0f0f0f); padding: 22px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }\n.hb-qha-cover { position: absolute; inset: 0 0 auto; height: 92px; background: linear-gradient(120deg, var(--hb-qha-c1), var(--hb-qha-c2)); opacity: .45; transition: background .5s; mask: linear-gradient(#000, transparent); }\n.hb-qha-pav { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin-top: 26px; font-size: 26px; font-weight: 600; color: #fff; background: linear-gradient(140deg, var(--hb-qha-c1), var(--hb-qha-c2)); border: 4px solid #111; box-shadow: 0 10px 30px -10px var(--hb-qha-c1); transition: background .5s, box-shadow .5s; }\n.hb-qha-pname { margin: 14px 0 2px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; min-height: 26px; }\n.hb-qha-pname[data-empty=\"true\"] { color: #555; }\n.hb-qha-prole { margin: 0; font-size: 13.5px; color: #8f8f8f; min-height: 20px; }\n.hb-qha-ptags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; min-height: 26px; }\n.hb-qha-ptag { height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; background: #1a1a1a; border: 1px solid #2a2a2a; color: #d4d4d4; animation: hb-qha-pop .35s cubic-bezier(.3,1.5,.5,1) both; }\n.hb-qha-pmeta { display: flex; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); font-size: 12.5px; color: #6f6f6f; }\n.hb-qha-pmeta b { display: block; color: #ededed; font-weight: 500; font-size: 13px; }\n.hb-qha-panel { border-radius: 22px; border: 1px solid rgba(255,255,255,.08); background: #111; padding: clamp(20px, 3cqw, 30px); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); min-width: 0; }\n.hb-qha-pane { animation: hb-qha-slide .45s cubic-bezier(.2,.7,.2,1) both; border: 0; margin: 0; padding: 0; min-width: 0; }\n.hb-qha-h { padding: 0; margin: 0 0 4px; font-size: 17px; font-weight: 600; }\n.hb-qha-hint { margin: 0 0 18px; font-size: 13.5px; color: #8f8f8f; }\n.hb-qha-avs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; max-width: 320px; }\n.hb-qha-av { position: relative; aspect-ratio: 1; border-radius: 50%; cursor: pointer; background: linear-gradient(140deg, var(--hb-qha-a1), var(--hb-qha-a2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); transition: transform .3s cubic-bezier(.3,1.6,.5,1), box-shadow .25s; }\n.hb-qha-av:hover { transform: scale(1.06); }\n.hb-qha-av input { position: absolute; opacity: 0; width: 1px; height: 1px; }\n.hb-qha-av:has(input:checked) { box-shadow: 0 0 0 3px #111, 0 0 0 5px var(--hb-qha-accent); transform: scale(1.04); }\n.hb-qha-av:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 4px; }\n.hb-qha-label { display: block; margin-bottom: 6px; font-size: 13px; color: #a1a1a1; }\n.hb-qha-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid #262626; background: #0c0c0c; color: #ededed; font: inherit; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }\n.hb-qha-input:focus { border-color: var(--hb-qha-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-qha-accent) 22%, transparent); }\n.hb-qha-input[aria-invalid=\"true\"] { border-color: #f87171; }\n.hb-qha-err { margin: 8px 0 0; font-size: 12.5px; color: #fca5a5; }\n.hb-qha-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.hb-qha-chip { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid #2a2a2a; background: #151515; color: #d4d4d4; font-size: 13.5px; cursor: pointer; user-select: none; transition: background .2s, border-color .2s, color .2s, transform .2s; }\n.hb-qha-chip:hover { border-color: #3a3a3a; background: #191919; }\n.hb-qha-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }\n.hb-qha-chip svg { width: 0; opacity: 0; transition: width .25s, opacity .25s; }\n.hb-qha-chip:has(input:checked) { border-color: color-mix(in srgb, var(--hb-qha-accent) 60%, transparent); background: color-mix(in srgb, var(--hb-qha-accent) 14%, #151515); color: #fff; }\n.hb-qha-chip:has(input:checked) svg { width: 12px; opacity: 1; }\n.hb-qha-chip:has(input:focus-visible) { outline: 2px solid var(--hb-qha-accent); outline-offset: 2px; }\n.hb-qha-chip:active { transform: scale(.96); }\n.hb-qha-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }\n.hb-qha-back { height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: #a1a1a1; font: inherit; font-size: 14px; cursor: pointer; }\n.hb-qha-back:hover:not(:disabled) { color: #ededed; background: #171717; }\n.hb-qha-back:disabled { opacity: 0; pointer-events: none; }\n.hb-qha-next { height: 44px; padding: 0 22px; border: 0; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; background: #ededed; color: #0a0a0a; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s, transform .2s; }\n.hb-qha-next:hover { background: #fff; }\n.hb-qha-next:disabled { cursor: progress; }\n.hb-qha-next[data-final=\"true\"] { background: var(--hb-qha-accent); color: #fff; }\n.hb-qha-next:focus-visible, .hb-qha-back:focus-visible, .hb-qha-cta:focus-visible { outline: 2px solid var(--hb-qha-accent); outline-offset: 2px; }\n.hb-qha-spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: hb-qha-turn .7s linear infinite; }\n.hb-qha-done { position: relative; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 10px 20px; }\n.hb-qha-burst { position: absolute; left: 50%; top: 74px; width: 0; height: 0; }\n.hb-qha-bit { position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--hb-qha-bc); opacity: 0; animation: hb-qha-fly 1.1s cubic-bezier(.15,.7,.3,1) var(--hb-qha-bd) forwards; }\n.hb-qha-check { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--hb-qha-accent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--hb-qha-accent) 15%, transparent); animation: hb-qha-pop .6s cubic-bezier(.3,1.6,.5,1) both; }\n.hb-qha-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: hb-qha-draw .45s .35s ease forwards; }\n.hb-qha-done h3 { margin: 12px 0 0; font-size: 22px; letter-spacing: -.02em; }\n.hb-qha-done p { margin: 0; max-width: 340px; font-size: 14px; color: #8f8f8f; line-height: 1.6; }\n.hb-qha-cta { margin-top: 10px; height: 44px; padding: 0 20px; border-radius: 12px; display: inline-flex; align-items: center; background: #ededed; color: #0a0a0a; font-size: 14px; font-weight: 600; text-decoration: none; }\n@container (min-width: 780px) {\n  .hb-qha-grid { grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }\n}\n@keyframes hb-qha-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }\n@keyframes hb-qha-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }\n@keyframes hb-qha-turn { to { transform: rotate(360deg); } }\n@keyframes hb-qha-draw { to { stroke-dashoffset: 0; } }\n@keyframes hb-qha-fly { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--hb-qha-bx), var(--hb-qha-by)) rotate(var(--hb-qha-br)); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-qha *, .hb-qha *::before, .hb-qha *::after { animation: none !important; transition: none !important; }\n  .hb-qha-check path { stroke-dashoffset: 0; }\n  .hb-qha-bit { display: none; }\n}\n`;\n\nconst defaultAvatars: [string, string][] = [\n  [\"#ec4899\", \"#8b5cf6\"],\n  [\"#f97316\", \"#facc15\"],\n  [\"#06b6d4\", \"#3b82f6\"],\n  [\"#22c55e\", \"#14b8a6\"],\n  [\"#6366f1\", \"#0ea5e9\"],\n  [\"#f43f5e\", \"#fb923c\"],\n  [\"#a3e635\", \"#22d3ee\"],\n  [\"#64748b\", \"#0f172a\"],\n];\n\nconst defaultRoles = [\"Designer\", \"Engineer\", \"Product manager\", \"Founder\", \"Marketing\", \"Data & analytics\", \"Student\", \"Something else\"];\nconst defaultInterests = [\"Design systems\", \"Prototyping\", \"Analytics\", \"Automation\", \"Accessibility\", \"Motion\", \"User research\", \"Growth\", \"APIs\", \"Mobile\", \"Writing\", \"Hiring\"];\nconst steps = [\"Profile\", \"Role\", \"Interests\"];\n\nfunction hash(n: number) {\n  let x = (n + 7) * 2654435761;\n  x = (x ^ (x >>> 15)) >>> 0;\n  x = Math.imul(x, 2246822519) >>> 0;\n  return ((x ^ (x >>> 13)) >>> 0) / 4294967295;\n}\n\nconst bits = Array.from({ length: 26 }, (_, i) => {\n  const angle = (i / 26) * Math.PI * 2 + hash(i) * 0.4;\n  const dist = 90 + hash(i + 30) * 110;\n  return {\n    x: (Math.cos(angle) * dist).toFixed(1),\n    y: (Math.sin(angle) * dist * 0.75 - 20).toFixed(1),\n    r: Math.round(hash(i + 60) * 540 - 270),\n    d: (hash(i + 90) * 0.15 + 0.2).toFixed(2),\n    c: [\"var(--hb-qha-accent)\", \"#a78bfa\", \"#facc15\", \"#22d3ee\", \"#ededed\"][i % 5],\n  };\n});\n\nfunction initials(name: string) {\n  const parts = name.trim().split(/\\s+/).filter(Boolean);\n  if (parts.length === 0) return \"?\";\n  return parts.slice(0, 2).map((p) => p[0].toUpperCase()).join(\"\");\n}\n\nfunction wait(result: unknown) {\n  return result instanceof Promise ? result : new Promise<unknown>((resolve) => setTimeout(() => resolve(result), 900));\n}\n\nfunction Tick() {\n  return <svg viewBox=\"0 0 12 12\" height=\"12\" aria-hidden=\"true\"><path d=\"m2.5 6.2 2.3 2.3 4.7-5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>;\n}\n\nexport function LoginOnboardingProfile({\n  workspace = \"Northwind\",\n  title = \"Set up your profile\",\n  avatars = defaultAvatars,\n  roles = defaultRoles,\n  interests = defaultInterests,\n  minInterests = 3,\n  defaultValues,\n  defaultStep = 0,\n  onStepChange,\n  onSubmit,\n  finishCta = { label: \"Go to your workspace\", href: \"#workspace\" },\n  accent = \"#ec4899\",\n  className = \"\",\n  style,\n  ...rest\n}: LoginOnboardingProfileProps) {\n  const uid = React.useId();\n  const [step, setStep] = React.useState<number>(defaultStep);\n  const [avatar, setAvatar] = React.useState(defaultValues?.avatar ?? 0);\n  const [name, setName] = React.useState(defaultValues?.name ?? \"\");\n  const [role, setRole] = React.useState(defaultValues?.role ?? \"\");\n  const [picked, setPicked] = React.useState<string[]>(defaultValues?.interests ?? []);\n  const [error, setError] = React.useState(\"\");\n  const [status, setStatus] = React.useState<\"idle\" | \"loading\" | \"done\">(\"idle\");\n  const nameRef = React.useRef<HTMLInputElement>(null);\n\n  const colors = avatars[avatar] ?? avatars[0] ?? [\"#ec4899\", \"#8b5cf6\"];\n\n  function go(next: number) {\n    setError(\"\");\n    setStep(next);\n    onStepChange?.(next);\n  }\n\n  function toggle(interest: string) {\n    setPicked((list) => (list.includes(interest) ? list.filter((i) => i !== interest) : [...list, interest]));\n    if (error) setError(\"\");\n  }\n\n  async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (status === \"loading\") return;\n    if (step === 0) {\n      if (name.trim().length < 2) {\n        setError(\"Add the name your teammates will see.\");\n        nameRef.current?.focus();\n        return;\n      }\n      return go(1);\n    }\n    if (step === 1) {\n      if (!role) return setError(\"Pick the role closest to what you do.\");\n      return go(2);\n    }\n    if (picked.length < minInterests) return setError(`Choose at least ${minInterests} so we can tailor your home.`);\n    setStatus(\"loading\");\n    try {\n      const result = await wait(onSubmit ? onSubmit({ avatar, name: name.trim(), role, interests: picked }) : true);\n      if (result === false) {\n        setStatus(\"idle\");\n        setError(\"We couldn't save your profile. Try again.\");\n      } else {\n        setStatus(\"done\");\n      }\n    } catch {\n      setStatus(\"idle\");\n      setError(\"We couldn't save your profile. Try again.\");\n    }\n  }\n\n  const first = name.trim().split(/\\s+/)[0] ?? \"\";\n  const done = status === \"done\";\n  const progressState = (i: number) => (done || step > i ? \"done\" : step === i ? \"current\" : \"todo\");\n\n  return (\n    <section className={`hb-qha ${className}`} style={{ \"--hb-qha-accent\": accent, \"--hb-qha-c1\": colors[0], \"--hb-qha-c2\": colors[1], ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-login-onboarding-profile\" precedence=\"default\">{css}</style>\n      <div className=\"hb-qha-inner\">\n        <div className=\"hb-qha-top\">\n          <div>\n            <span className=\"hb-qha-kicker\">Welcome to {workspace}</span>\n            <h2 className=\"hb-qha-title\">{done ? `You're all set${first ? `, ${first}` : \"\"}` : title}</h2>\n          </div>\n          <span className=\"hb-qha-count\" aria-live=\"polite\">{done ? \"Complete\" : `Step ${step + 1} of ${steps.length}`}</span>\n        </div>\n        <ol className=\"hb-qha-prog\" aria-label=\"Setup progress\">\n          {steps.map((s, i) => (\n            <li key={s} data-state={progressState(i)} aria-current={!done && step === i ? \"step\" : undefined}>\n              <span className=\"hb-qha-track\"><i /></span>\n              {s}\n            </li>\n          ))}\n        </ol>\n        <div className=\"hb-qha-grid\">\n          <aside className=\"hb-qha-preview\" aria-label=\"Profile preview\">\n            <span className=\"hb-qha-cover\" aria-hidden=\"true\" />\n            <span className=\"hb-qha-pav\" aria-hidden=\"true\">{initials(name)}</span>\n            <p className=\"hb-qha-pname\" data-empty={!name.trim()}>{name.trim() || \"Your name\"}</p>\n            <p className=\"hb-qha-prole\">{role ? `${role} at ${workspace}` : `Member of ${workspace}`}</p>\n            <div className=\"hb-qha-ptags\">\n              {picked.slice(0, 6).map((t) => <span key={t} className=\"hb-qha-ptag\">{t}</span>)}\n              {picked.length > 6 && <span className=\"hb-qha-ptag\">+{picked.length - 6}</span>}\n            </div>\n            <div className=\"hb-qha-pmeta\">\n              <span><b>Local time</b>Lisbon, GMT+0</span>\n              <span><b>Teams</b>Design, Growth</span>\n            </div>\n          </aside>\n          <div className=\"hb-qha-panel\">\n            {done ? (\n              <div className=\"hb-qha-done\" role=\"status\">\n                <span className=\"hb-qha-burst\" aria-hidden=\"true\">\n                  {bits.map((b, i) => (\n                    <i key={i} className=\"hb-qha-bit\" style={{ \"--hb-qha-bx\": `${b.x}px`, \"--hb-qha-by\": `${b.y}px`, \"--hb-qha-br\": `${b.r}deg`, \"--hb-qha-bd\": `${b.d}s`, \"--hb-qha-bc\": b.c } as React.CSSProperties} />\n                  ))}\n                </span>\n                <span className=\"hb-qha-check\">\n                  <svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"m6 12.5 4 4 8-9\" fill=\"none\" stroke=\"#fff\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n                </span>\n                <h3>Profile saved</h3>\n                <p>We picked {picked.length} spaces and 4 teammates to follow based on your interests. You can change them in settings.</p>\n                <a className=\"hb-qha-cta\" href={finishCta.href}>{finishCta.label}</a>\n              </div>\n            ) : (\n              <form noValidate onSubmit={handleSubmit}>\n                {step === 0 && (\n                  <fieldset className=\"hb-qha-pane\" key=\"s0\">\n                    <legend className=\"hb-qha-h\">Pick an avatar</legend>\n                    <p className=\"hb-qha-hint\">You can upload a photo later from settings.</p>\n                    <div className=\"hb-qha-avs\" role=\"radiogroup\" aria-label=\"Avatar color\">\n                      {avatars.map(([a1, a2], i) => (\n                        <label key={i} className=\"hb-qha-av\" style={{ \"--hb-qha-a1\": a1, \"--hb-qha-a2\": a2 } as React.CSSProperties}>\n                          <input type=\"radio\" name={`${uid}-av`} checked={avatar === i} onChange={() => setAvatar(i)} aria-label={`Avatar ${i + 1}`} />\n                        </label>\n                      ))}\n                    </div>\n                    <label className=\"hb-qha-label\" htmlFor={`${uid}-n`}>Full name</label>\n                    <input ref={nameRef} id={`${uid}-n`} className=\"hb-qha-input\" autoComplete=\"name\" placeholder=\"Mara Okafor\" value={name} aria-invalid={error ? true : undefined} aria-describedby={error ? `${uid}-err` : undefined} onChange={(e) => { setName(e.target.value); if (error) setError(\"\"); }} />\n                  </fieldset>\n                )}\n                {step === 1 && (\n                  <fieldset className=\"hb-qha-pane\" key=\"s1\" aria-invalid={error ? true : undefined} aria-describedby={error ? `${uid}-err` : undefined}>\n                    <legend className=\"hb-qha-h\">What do you do?</legend>\n                    <p className=\"hb-qha-hint\">We use this to set up your default views.</p>\n                    <div className=\"hb-qha-chips\">\n                      {roles.map((r) => (\n                        <label key={r} className=\"hb-qha-chip\">\n                          <input type=\"radio\" name={`${uid}-role`} checked={role === r} onChange={() => { setRole(r); setError(\"\"); }} />\n                          <Tick />\n                          {r}\n                        </label>\n                      ))}\n                    </div>\n                  </fieldset>\n                )}\n                {step === 2 && (\n                  <fieldset className=\"hb-qha-pane\" key=\"s2\" aria-invalid={error ? true : undefined} aria-describedby={error ? `${uid}-err` : undefined}>\n                    <legend className=\"hb-qha-h\">What are you into?</legend>\n                    <p className=\"hb-qha-hint\">Choose {minInterests} or more. {picked.length} selected.</p>\n                    <div className=\"hb-qha-chips\">\n                      {interests.map((t) => (\n                        <label key={t} className=\"hb-qha-chip\">\n                          <input type=\"checkbox\" checked={picked.includes(t)} onChange={() => toggle(t)} />\n                          <Tick />\n                          {t}\n                        </label>\n                      ))}\n                    </div>\n                  </fieldset>\n                )}\n                {error && <p className=\"hb-qha-err\" id={`${uid}-err`} role=\"alert\">{error}</p>}\n                <div className=\"hb-qha-bar\">\n                  <button type=\"button\" className=\"hb-qha-back\" disabled={step === 0} onClick={() => go(step - 1)}>Back</button>\n                  <button type=\"submit\" className=\"hb-qha-next\" data-final={step === 2} disabled={status === \"loading\"} aria-busy={status === \"loading\"}>\n                    {status === \"loading\" && <span className=\"hb-qha-spin\" aria-hidden=\"true\" />}\n                    {step === 2 ? (status === \"loading\" ? \"Saving\" : \"Finish setup\") : \"Continue\"}\n                  </button>\n                </div>\n              </form>\n            )}\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}