{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "modal-bottom-sheet",
  "type": "registry:component",
  "title": "Snap Bottom Sheet",
  "description": "A draggable bottom sheet with peek and full snap points, velocity-aware flicks and drag down to dismiss. The default content is a ride picker with a radio list and a sticky confirm button.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "modals",
    "bottom sheet",
    "drawer",
    "drag",
    "snap",
    "mobile",
    "modal"
  ],
  "docs": "https://hyperblur.dev/effects/modal-bottom-sheet",
  "files": [
    {
      "path": "registry/hyperblur/modal-bottom-sheet.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/modal-bottom-sheet.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface ModalSheetOption {\n  id: string;\n  name: string;\n  seats: number;\n  eta: string;\n  arrival: string;\n  price: string;\n  tag?: string;\n}\n\nexport interface ModalBottomSheetProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"onChange\"> {\n  open?: boolean;\n  defaultOpen?: boolean;\n  onOpenChange?: (open: boolean) => void;\n  embedded?: boolean;\n  trigger?: React.ReactNode;\n  title?: string;\n  subtitle?: string;\n  options?: ModalSheetOption[];\n  value?: string;\n  defaultValue?: string;\n  onChange?: (id: string) => void;\n  onConfirm?: (id: string) => void;\n  payment?: string;\n  defaultSnap?: \"peek\" | \"full\";\n  accent?: string;\n}\n\nconst defaultOptions: ModalSheetOption[] = [\n  { id: \"standard\", name: \"Standard\", seats: 4, eta: \"4 min\", arrival: \"Drop-off 9:52\", price: \"$18.40\" },\n  { id: \"comfort\", name: \"Comfort\", seats: 4, eta: \"6 min\", arrival: \"Drop-off 9:54\", price: \"$24.10\", tag: \"Quiet ride\" },\n  { id: \"xl\", name: \"XL\", seats: 6, eta: \"9 min\", arrival: \"Drop-off 9:57\", price: \"$31.75\" },\n  { id: \"green\", name: \"Electric\", seats: 4, eta: \"7 min\", arrival: \"Drop-off 9:55\", price: \"$21.90\", tag: \"Zero emission\" },\n];\n\nconst css = `\n.hb-xe2 { --hb-xe2-accent: #d4f75a; display: inline-block; box-sizing: border-box; color: #ededed; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); }\n.hb-xe2 *, .hb-xe2 *::before, .hb-xe2 *::after { box-sizing: border-box; }\n.hb-xe2[data-embedded] { container-type: size; position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 190px; border-radius: 16px; overflow: hidden; isolation: isolate; background: #0c0d0c; }\n.hb-xe2-map { position: absolute; inset: 0; opacity: 0.9; background:\n  linear-gradient(90deg, transparent 0 46%, #1a1c1a 46% 49%, transparent 49%),\n  linear-gradient(0deg, transparent 0 30%, #1a1c1a 30% 33%, transparent 33% 70%, #171917 70% 72%, transparent 72%),\n  linear-gradient(32deg, transparent 0 62%, #191b19 62% 64%, transparent 64%),\n  radial-gradient(60% 50% at 70% 20%, #131613, #0c0d0c); }\n.hb-xe2-trigger { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: #f2f2ef; color: #0a0a0a; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.9), inset 0 -2px 0 rgba(0, 0, 0, 0.08); transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1); }\n.hb-xe2-trigger:active { transform: scale(0.96); }\n.hb-xe2-trigger i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #0a0a0a; color: var(--hb-xe2-accent); font-style: normal; }\n.hb-xe2-trigger svg { width: 12px; height: 12px; }\n.hb-xe2-trigger:focus-visible, .hb-xe2-handle:focus-visible, .hb-xe2-opt:focus-visible, .hb-xe2-cta:focus-visible, .hb-xe2-link:focus-visible { outline: 2px solid var(--hb-xe2-accent); outline-offset: 2px; }\n.hb-xe2-layer { position: fixed; inset: 0; z-index: 1000; height: 100dvh; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }\n.hb-xe2[data-embedded] .hb-xe2-layer { position: absolute; height: auto; z-index: 2; }\n.hb-xe2-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); animation: hb-xe2-fade 0.3s ease both; }\n.hb-xe2-layer[data-state=\"closed\"] .hb-xe2-scrim { animation: hb-xe2-fade-out 0.3s ease both; }\n.hb-xe2-sheet { position: relative; width: min(520px, 100%); height: min(86dvh, 640px); animation: hb-xe2-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }\n.hb-xe2[data-embedded] .hb-xe2-sheet { width: calc(100% - 16px); height: calc(100% - 10px); }\n.hb-xe2-layer[data-state=\"closed\"] .hb-xe2-sheet { animation: hb-xe2-down 0.3s cubic-bezier(0.5, 0, 0.75, 0) both; }\n.hb-xe2-panel { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--hb-xe2-h, 100%) - var(--hb-xe2-drag, 0px)); max-height: calc(100% + 24px); display: flex; flex-direction: column; border: 1px solid #262826; border-bottom: 0; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #171917, #111211 120px); box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05); outline: none; overflow: hidden; transition: height 0.46s cubic-bezier(0.2, 0.9, 0.25, 1); touch-action: none; }\n.hb-xe2-panel[data-dragging=\"true\"] { transition: none; }\n.hb-xe2-grab { flex: none; padding: 8px 18px 0; cursor: grab; user-select: none; }\n.hb-xe2-panel[data-dragging=\"true\"] .hb-xe2-grab { cursor: grabbing; }\n.hb-xe2-handle { display: block; width: 44px; height: 14px; margin: 0 auto 4px; padding: 0; border: 0; background: transparent; cursor: inherit; border-radius: 8px; }\n.hb-xe2-handle::before { content: \"\"; display: block; width: 36px; height: 4px; margin: 5px auto; border-radius: 4px; background: #3a3d3a; transition: background-color 0.2s ease, width 0.25s cubic-bezier(0.3, 0.7, 0.4, 1); }\n.hb-xe2-grab:hover .hb-xe2-handle::before { background: #5a5e5a; width: 44px; }\n.hb-xe2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-bottom: 10px; }\n.hb-xe2-title { margin: 0; font-family: var(--font-grotesk, inherit); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }\n.hb-xe2-sub { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; color: #8d918d; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-xe2-sub b { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--hb-xe2-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-xe2-accent) 20%, transparent); }\n.hb-xe2-link { flex: none; border: 0; background: none; padding: 4px 2px; color: #b5b9b5; font: inherit; font-size: 12px; cursor: pointer; border-radius: 6px; }\n.hb-xe2-link:hover { color: #fff; }\n.hb-xe2-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; }\n.hb-xe2-list { display: grid; gap: 6px; margin: 0; padding: 0; }\n.hb-xe2-opt { position: relative; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 9px 12px 9px 8px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease; }\n.hb-xe2-opt:hover { background: #181a18; }\n.hb-xe2-opt:active { transform: scale(0.99); }\n.hb-xe2-opt[aria-checked=\"true\"] { border-color: color-mix(in srgb, var(--hb-xe2-accent) 60%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--hb-xe2-accent) 9%, #141614), #141614); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }\n.hb-xe2-car { display: grid; place-items: center; height: 34px; border-radius: 10px; background: radial-gradient(80% 70% at 50% 100%, #252825, #171917); color: #cfd3cf; }\n.hb-xe2-opt[aria-checked=\"true\"] .hb-xe2-car { color: var(--hb-xe2-accent); }\n.hb-xe2-car svg { width: 34px; height: 18px; }\n.hb-xe2-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }\n.hb-xe2-seats { display: inline-flex; align-items: center; gap: 2px; color: #7f837f; font-size: 11.5px; font-weight: 500; }\n.hb-xe2-seats svg { width: 10px; height: 10px; }\n.hb-xe2-meta { display: block; margin-top: 2px; color: #8d918d; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-xe2-tag { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #1f221f; color: #b9bdb9; font-size: 10.5px; }\n.hb-xe2-price { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }\n.hb-xe2-foot { flex: none; display: grid; gap: 10px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid #1f211f; background: #111211; }\n.hb-xe2-pay { display: flex; align-items: center; justify-content: space-between; color: #a6aaa6; font-size: 12px; }\n.hb-xe2-card { display: inline-flex; align-items: center; gap: 8px; color: #ededed; }\n.hb-xe2-card i { width: 24px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, #3d5afe, #1a237e); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }\n.hb-xe2-cta { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 0; border-radius: 14px; background: var(--hb-xe2-accent); color: #0a0a0a; font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 24px -12px color-mix(in srgb, var(--hb-xe2-accent) 80%, transparent); transition: transform 0.15s cubic-bezier(0.3, 0.7, 0.4, 1), filter 0.2s ease; }\n.hb-xe2-cta:hover { filter: brightness(1.05); }\n.hb-xe2-cta:active { transform: scale(0.98); }\n.hb-xe2-cta[data-done=\"true\"] { background: #ededed; }\n.hb-xe2-cta svg { width: 15px; height: 15px; }\n.hb-xe2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n@container (max-height: 320px) {\n  .hb-xe2-pay { display: none; }\n  .hb-xe2-cta { height: 40px; font-size: 13.5px; border-radius: 12px; }\n  .hb-xe2-foot { padding: 8px 12px 10px; }\n  .hb-xe2-opt { padding-top: 7px; padding-bottom: 7px; }\n}\n@keyframes hb-xe2-fade { from { opacity: 0; } to { opacity: 1; } }\n@keyframes hb-xe2-fade-out { from { opacity: 1; } to { opacity: 0; } }\n@keyframes hb-xe2-up { from { transform: translateY(100%); } to { transform: none; } }\n@keyframes hb-xe2-down { from { transform: none; } to { transform: translateY(100%); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xe2-scrim, .hb-xe2-sheet, .hb-xe2-layer[data-state=\"closed\"] .hb-xe2-scrim, .hb-xe2-layer[data-state=\"closed\"] .hb-xe2-sheet { animation: none; }\n  .hb-xe2-layer[data-state=\"closed\"] { opacity: 0; }\n  .hb-xe2-panel, .hb-xe2-opt, .hb-xe2-cta, .hb-xe2-trigger, .hb-xe2-handle::before { transition: none; }\n}\n`;\n\nconst focusable =\n  'a[href],button:not(:disabled),input:not(:disabled),select:not(:disabled),textarea:not(:disabled),[tabindex]:not([tabindex=\"-1\"])';\n\nfunction useLayer(\n  open: boolean,\n  embedded: boolean,\n  panel: React.RefObject<HTMLElement | null>,\n  onClose: () => void,\n  userOpened: React.RefObject<boolean>,\n) {\n  const closeRef = React.useRef(onClose);\n  React.useEffect(() => {\n    closeRef.current = onClose;\n  });\n  React.useEffect(() => {\n    if (!open) return;\n    const node = panel.current;\n    const steal = !embedded || userOpened.current;\n    const previous = document.activeElement as HTMLElement | null;\n    const html = document.documentElement;\n    const overflow = html.style.overflow;\n    if (!embedded) html.style.overflow = \"hidden\";\n    if (steal && node) {\n      const target = node.querySelector<HTMLElement>(\"[data-autofocus]\") ?? node.querySelector<HTMLElement>(focusable) ?? node;\n      target.focus({ preventScroll: true });\n    }\n    const onKey = (e: KeyboardEvent) => {\n      if (!node) return;\n      if (embedded && !node.contains(document.activeElement)) return;\n      if (e.key === \"Escape\") {\n        e.preventDefault();\n        closeRef.current();\n        return;\n      }\n      if (e.key !== \"Tab\") return;\n      const items = Array.from(node.querySelectorAll<HTMLElement>(focusable)).filter((el) => el.getClientRects().length > 0);\n      if (!items.length) {\n        e.preventDefault();\n        node.focus();\n        return;\n      }\n      const first = items[0];\n      const last = items[items.length - 1];\n      const active = document.activeElement;\n      if (!node.contains(active)) {\n        e.preventDefault();\n        first.focus();\n      } else if (e.shiftKey && (active === first || active === node)) {\n        e.preventDefault();\n        last.focus();\n      } else if (!e.shiftKey && active === last) {\n        e.preventDefault();\n        first.focus();\n      }\n    };\n    document.addEventListener(\"keydown\", onKey);\n    return () => {\n      document.removeEventListener(\"keydown\", onKey);\n      if (!embedded) html.style.overflow = overflow;\n      if (steal && previous && previous.isConnected && previous !== document.body) previous.focus({ preventScroll: true });\n    };\n  }, [open, embedded, panel, userOpened]);\n}\n\nconst carPath = \"M3 13.5h1.6a2.4 2.4 0 0 0 4.8 0h13.2a2.4 2.4 0 0 0 4.8 0H31V10l-3.2-1.2-3.6-3.8H11.4L7.2 8.6 3 9.6v3.9Z\";\n\nexport function ModalBottomSheet({\n  open,\n  defaultOpen,\n  onOpenChange,\n  embedded = false,\n  trigger = \"Choose a ride\",\n  title = \"Choose a ride\",\n  subtitle = \"Pickup at 221 Mercer St · 3 min walk\",\n  options = defaultOptions,\n  value,\n  defaultValue = \"comfort\",\n  onChange,\n  onConfirm,\n  payment = \"Visa •• 4242\",\n  defaultSnap = \"peek\",\n  accent = \"#d4f75a\",\n  className = \"\",\n  style,\n  ...rest\n}: ModalBottomSheetProps) {\n  const [inner, setInner] = React.useState(defaultOpen ?? embedded);\n  const isOpen = open ?? inner;\n  const [present, setPresent] = React.useState(isOpen);\n  const [snap, setSnap] = React.useState<\"peek\" | \"full\">(defaultSnap);\n  const [picked, setPicked] = React.useState(defaultValue);\n  const [done, setDone] = React.useState(false);\n  const selected = value ?? picked;\n  const userOpened = React.useRef(false);\n  const panel = React.useRef<HTMLDivElement>(null);\n  const drag = React.useRef<{ y: number; t: number; last: number; lastT: number; v: number; d: number } | null>(null);\n  const timer = React.useRef(0);\n  const id = React.useId();\n  const peek = embedded ? 30 : 42;\n\n  if (isOpen && !present) setPresent(true);\n\n  const setOpen = React.useCallback(\n    (next: boolean) => {\n      if (next) {\n        userOpened.current = true;\n        setSnap(defaultSnap);\n        setDone(false);\n      }\n      if (open === undefined) setInner(next);\n      onOpenChange?.(next);\n    },\n    [open, onOpenChange, defaultSnap],\n  );\n  const close = React.useCallback(() => setOpen(false), [setOpen]);\n\n  React.useEffect(() => {\n    if (isOpen || !present) return;\n    const t = setTimeout(() => setPresent(false), 300);\n    return () => clearTimeout(t);\n  }, [isOpen, present]);\n\n  React.useEffect(() => () => clearTimeout(timer.current), []);\n\n  useLayer(isOpen, embedded, panel, close, userOpened);\n\n  function choose(next: string) {\n    if (value === undefined) setPicked(next);\n    onChange?.(next);\n  }\n\n  function onPointerDown(e: React.PointerEvent<HTMLDivElement>) {\n    if (e.button !== 0) return;\n    const now = e.timeStamp;\n    drag.current = { y: e.clientY, t: now, last: e.clientY, lastT: now, v: 0, d: 0 };\n    e.currentTarget.setPointerCapture(e.pointerId);\n    panel.current?.setAttribute(\"data-dragging\", \"true\");\n  }\n\n  function onPointerMove(e: React.PointerEvent<HTMLDivElement>) {\n    const s = drag.current;\n    const p = panel.current;\n    if (!s || !p) return;\n    const raw = e.clientY - s.y;\n    const sheet = p.parentElement?.offsetHeight ?? p.offsetHeight;\n    const top = snap === \"full\" ? 0 : -(sheet * peek) / 100;\n    const d = raw < top ? top + (raw - top) * 0.22 : raw;\n    const dt = Math.max(e.timeStamp - s.lastT, 1);\n    s.v = (e.clientY - s.last) / dt;\n    s.last = e.clientY;\n    s.lastT = e.timeStamp;\n    s.d = d;\n    p.style.setProperty(\"--hb-xe2-drag\", `${d.toFixed(1)}px`);\n  }\n\n  function onPointerUp() {\n    const s = drag.current;\n    const p = panel.current;\n    drag.current = null;\n    if (!s || !p) return;\n    p.removeAttribute(\"data-dragging\");\n    p.style.setProperty(\"--hb-xe2-drag\", \"0px\");\n    const h = p.parentElement?.offsetHeight ?? p.offsetHeight;\n    const base = snap === \"full\" ? 0 : (h * peek) / 100;\n    const pos = base + s.d;\n    const peekPx = (h * peek) / 100;\n    if (Math.abs(s.d) < 4) return;\n    if (s.v > 0.55) {\n      if (snap === \"full\" && pos < peekPx + h * 0.25) setSnap(\"peek\");\n      else close();\n      return;\n    }\n    if (s.v < -0.55) {\n      setSnap(\"full\");\n      return;\n    }\n    if (pos > (peekPx + h) / 2) close();\n    else if (pos > peekPx / 2) setSnap(\"peek\");\n    else setSnap(\"full\");\n  }\n\n  function onHandleKey(e: React.KeyboardEvent<HTMLButtonElement>) {\n    if (e.key === \"ArrowUp\") {\n      e.preventDefault();\n      setSnap(\"full\");\n    } else if (e.key === \"ArrowDown\") {\n      e.preventDefault();\n      if (snap === \"full\") setSnap(\"peek\");\n      else close();\n    }\n  }\n\n  function onListKey(e: React.KeyboardEvent<HTMLDivElement>) {\n    if (![\"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\"].includes(e.key)) return;\n    e.preventDefault();\n    const i = options.findIndex((o) => o.id === selected);\n    const step = e.key === \"ArrowDown\" || e.key === \"ArrowRight\" ? 1 : -1;\n    const next = options[(i + step + options.length) % options.length];\n    choose(next.id);\n    const el = e.currentTarget.querySelector<HTMLElement>(`[data-id=\"${next.id}\"]`);\n    el?.focus();\n  }\n\n  function confirm() {\n    if (done) return;\n    setDone(true);\n    onConfirm?.(selected);\n    timer.current = window.setTimeout(close, 900);\n  }\n\n  const current = options.find((o) => o.id === selected) ?? options[0];\n  const vars = { \"--hb-xe2-accent\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <div className={`hb-xe2 ${className}`} data-embedded={embedded || undefined} style={vars} {...rest}>\n      <style href=\"hb-xe2-css\" precedence=\"default\">{css}</style>\n      {embedded && <div className=\"hb-xe2-map\" aria-hidden=\"true\" />}\n      {trigger !== null && (\n        <button type=\"button\" className=\"hb-xe2-trigger\" aria-haspopup=\"dialog\" aria-expanded={isOpen} onClick={() => setOpen(true)}>\n          <i aria-hidden=\"true\">\n            <svg viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M6 1a3.6 3.6 0 0 0-3.6 3.6C2.4 7.3 6 11 6 11s3.6-3.7 3.6-6.4A3.6 3.6 0 0 0 6 1Zm0 4.9a1.3 1.3 0 1 1 0-2.6 1.3 1.3 0 0 1 0 2.6Z\" /></svg>\n          </i>\n          {trigger}\n        </button>\n      )}\n      {present && (\n        <div className=\"hb-xe2-layer\" data-state={isOpen ? \"open\" : \"closed\"}>\n          <div className=\"hb-xe2-scrim\" onClick={close} aria-hidden=\"true\" />\n          <div className=\"hb-xe2-sheet\">\n            <div\n              ref={panel}\n              role=\"dialog\"\n              aria-modal=\"true\"\n              aria-labelledby={`${id}-t`}\n              tabIndex={-1}\n              className=\"hb-xe2-panel\"\n              style={{ \"--hb-xe2-h\": snap === \"full\" ? \"100%\" : `${100 - peek}%` } as React.CSSProperties}\n            >\n              <div\n                className=\"hb-xe2-grab\"\n                onPointerDown={onPointerDown}\n                onPointerMove={onPointerMove}\n                onPointerUp={onPointerUp}\n                onPointerCancel={onPointerUp}\n              >\n                <button\n                  type=\"button\"\n                  className=\"hb-xe2-handle\"\n                  aria-label={snap === \"full\" ? \"Collapse sheet\" : \"Expand sheet\"}\n                  aria-expanded={snap === \"full\"}\n                  onClick={() => setSnap(snap === \"full\" ? \"peek\" : \"full\")}\n                  onKeyDown={onHandleKey}\n                />\n                <div className=\"hb-xe2-head\">\n                  <div style={{ minWidth: 0 }}>\n                    <h2 id={`${id}-t`} className=\"hb-xe2-title\">{title}</h2>\n                    <p className=\"hb-xe2-sub\"><b aria-hidden=\"true\" />{subtitle}</p>\n                  </div>\n                  <button type=\"button\" className=\"hb-xe2-link\" onClick={close}>Cancel</button>\n                </div>\n              </div>\n              <div className=\"hb-xe2-body\">\n                <div role=\"radiogroup\" aria-label=\"Ride type\" className=\"hb-xe2-list\" onKeyDown={onListKey}>\n                  {options.map((o) => {\n                    const on = o.id === selected;\n                    return (\n                      <button\n                        key={o.id}\n                        type=\"button\"\n                        role=\"radio\"\n                        aria-checked={on}\n                        tabIndex={on ? 0 : -1}\n                        data-id={o.id}\n                        data-autofocus={on ? \"\" : undefined}\n                        className=\"hb-xe2-opt\"\n                        onClick={() => choose(o.id)}\n                      >\n                        <span className=\"hb-xe2-car\" aria-hidden=\"true\">\n                          <svg viewBox=\"0 0 34 18\" fill=\"currentColor\">\n                            <path d={carPath} />\n                            <circle cx=\"7\" cy=\"13.5\" r=\"1.7\" fill=\"#0c0d0c\" />\n                            <circle cx=\"25\" cy=\"13.5\" r=\"1.7\" fill=\"#0c0d0c\" />\n                          </svg>\n                        </span>\n                        <span style={{ minWidth: 0 }}>\n                          <span className=\"hb-xe2-name\">\n                            {o.name}\n                            <span className=\"hb-xe2-seats\">\n                              <svg viewBox=\"0 0 10 10\" fill=\"currentColor\" aria-hidden=\"true\"><circle cx=\"5\" cy=\"3\" r=\"2\" /><path d=\"M1.5 9.5a3.5 3.5 0 0 1 7 0Z\" /></svg>\n                              {o.seats}\n                            </span>\n                          </span>\n                          <span className=\"hb-xe2-meta\">\n                            {o.eta} away · {o.arrival}\n                            {o.tag && <span className=\"hb-xe2-tag\">{o.tag}</span>}\n                          </span>\n                        </span>\n                        <span className=\"hb-xe2-price\">{o.price}</span>\n                      </button>\n                    );\n                  })}\n                </div>\n              </div>\n              <div className=\"hb-xe2-foot\">\n                <div className=\"hb-xe2-pay\">\n                  <span className=\"hb-xe2-card\"><i aria-hidden=\"true\" />{payment}</span>\n                  <span>Personal</span>\n                </div>\n                <button type=\"button\" className=\"hb-xe2-cta\" data-done={done ? \"true\" : undefined} onClick={confirm}>\n                  {done ? (\n                    <>\n                      <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\"><path d=\"m3.5 8.4 3 3 6-6.4\" /></svg>\n                      Finding your driver\n                    </>\n                  ) : (\n                    <>Confirm {current?.name} · {current?.price}</>\n                  )}\n                </button>\n                <span className=\"hb-xe2-sr\" aria-live=\"polite\">{done ? `${current?.name} requested` : \"\"}</span>\n              </div>\n            </div>\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n"
    }
  ]
}