{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "share-settings-modal",
  "title": "Share Settings Modal",
  "description": "A share dialog for a document: add people from a directory with keyboard autocomplete, set each person's access or remove them, choose general access (restricted, everyone in the workspace, anyone with the link) with its own role, link settings for expiry, password and downloads, copy link and notify people.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/share-settings-modal/share-settings-modal.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\ntype Access = \"view\" | \"comment\" | \"edit\";\ntype General = \"restricted\" | \"workspace\" | \"link\";\ninterface Person {\n  id: string;\n  name: string;\n  email: string;\n  color: string;\n}\ninterface Share extends Person {\n  access: Access | \"owner\";\n}\n\nexport interface ShareSettingsModalProps {\n  title?: string;\n  workspace?: string;\n  directory?: Person[];\n  defaultOpen?: boolean;\n  onSave?: (data: { people: { email: string; access: string }[]; general: General; linkAccess: Access; notify: boolean }) => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0A0A0A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.62)\", faint: \"rgba(245,244,241,0.36)\", panel: \"#141414\", menu: \"#1A1A1A\", border: \"rgba(255,255,255,0.09)\", input: \"#0E0E0E\", hover: \"rgba(255,255,255,0.06)\", track: \"rgba(255,255,255,0.1)\", on: \"#F5F4F1\", onText: \"#0A0A0A\", accent: \"#60A5FA\", green: \"#4ADE80\", amber: \"#FBBF24\", ring: \"rgba(245,244,241,0.6)\", scrim: \"rgba(0,0,0,0.6)\", ghost: \"rgba(255,255,255,0.035)\" },\n  light: { bg: \"#F4F4F1\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.42)\", panel: \"#FFFFFF\", menu: \"#FFFFFF\", border: \"rgba(10,10,10,0.1)\", input: \"#FAFAF8\", hover: \"rgba(10,10,10,0.05)\", track: \"rgba(10,10,10,0.12)\", on: \"#0A0A0A\", onText: \"#FAFAF8\", accent: \"#2563EB\", green: \"#15803D\", amber: \"#B45309\", ring: \"rgba(10,10,10,0.5)\", scrim: \"rgba(10,10,10,0.3)\", ghost: \"rgba(10,10,10,0.04)\" },\n};\nconst DIRECTORY: Person[] = [\n  { id: \"lena\", name: \"Lena Brandt\", email: \"lena@nexora.io\", color: \"#60A5FA\" },\n  { id: \"daniel\", name: \"Daniel Reyes\", email: \"daniel@nexora.io\", color: \"#F472B6\" },\n  { id: \"mia\", name: \"Mia Okafor\", email: \"mia@nexora.io\", color: \"#A78BFA\" },\n  { id: \"tomas\", name: \"Tomás Ferreira\", email: \"tomas@nexora.io\", color: \"#34D399\" },\n  { id: \"aiko\", name: \"Aiko Tanaka\", email: \"aiko@nexora.io\", color: \"#FBBF24\" },\n  { id: \"jonas\", name: \"Jonas Weber\", email: \"jonas@nexora.io\", color: \"#2DD4BF\" },\n  { id: \"grace\", name: \"Grace Kim\", email: \"grace@nexora.io\", color: \"#F87171\" },\n];\nconst ACCESS: { id: Access; label: string }[] = [\n  { id: \"view\", label: \"Can view\" },\n  { id: \"comment\", label: \"Can comment\" },\n  { id: \"edit\", label: \"Can edit\" },\n];\nconst GENERAL: { id: General; label: string; hint: (ws: string) => string; icon: string }[] = [\n  { id: \"restricted\", label: \"Restricted\", hint: () => \"Only people added above can open it\", icon: \"M7 11V8a5 5 0 0 1 10 0v3M5 11h14v10H5z\" },\n  { id: \"workspace\", label: \"Anyone at\", hint: (ws) => `Everyone in ${ws} can find and open it`, icon: \"M4 21V5l8-2v18M12 7h8v14M2 21h20\" },\n  { id: \"link\", label: \"Anyone with the link\", hint: () => \"No sign-in needed\", icon: \"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1\" },\n];\nconst initials = (n: string) =>\n  n\n    .split(\" \")\n    .map((w) => w[0])\n    .join(\"\");\n\nexport function ShareSettingsModal({ title = \"Q4 board deck\", workspace = \"Nexora\", directory = DIRECTORY, defaultOpen = true, onSave, theme = \"dark\", className }: ShareSettingsModalProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const initialPeople: Share[] = React.useMemo(() => [{ ...directory[0], access: \"owner\" }, { ...directory[1], access: \"edit\" }, { ...directory[2], access: \"comment\" }], [directory]);\n  const [open, setOpen] = React.useState(defaultOpen);\n  const [people, setPeople] = React.useState<Share[]>(initialPeople);\n  const [query, setQuery] = React.useState(\"\");\n  const [active, setActive] = React.useState(0);\n  const [newAccess, setNewAccess] = React.useState<Access>(\"edit\");\n  const [general, setGeneral] = React.useState<General>(\"restricted\");\n  const [linkAccess, setLinkAccess] = React.useState<Access>(\"view\");\n  const [notify, setNotify] = React.useState(true);\n  const [advanced, setAdvanced] = React.useState(false);\n  const [expires, setExpires] = React.useState(false);\n  const [expiry, setExpiry] = React.useState(\"2026-12-01\");\n  const [locked, setLocked] = React.useState(false);\n  const [pass, setPass] = React.useState(\"\");\n  const [noDownload, setNoDownload] = React.useState(false);\n  const [copied, setCopied] = React.useState(false);\n  const [saved, setSaved] = React.useState(false);\n\n  React.useEffect(() => {\n    if (!copied) return;\n    const t = setTimeout(() => setCopied(false), 1600);\n    return () => clearTimeout(t);\n  }, [copied]);\n  React.useEffect(() => {\n    if (!open) return;\n    const onKey = (e: KeyboardEvent) => e.key === \"Escape\" && !(e.target as HTMLElement).closest(\"input\") && setOpen(false);\n    document.addEventListener(\"keydown\", onKey);\n    return () => document.removeEventListener(\"keydown\", onKey);\n  }, [open]);\n\n  const q = query.trim().toLowerCase();\n  const suggestions = q ? directory.filter((d) => !people.some((x) => x.id === d.id) && (d.name.toLowerCase().includes(q) || d.email.includes(q))).slice(0, 4) : [];\n  const changes = (JSON.stringify(people) !== JSON.stringify(initialPeople) ? 1 : 0) + (general !== \"restricted\" ? 1 : 0) + (expires || locked || noDownload ? 1 : 0);\n  const addPerson = (d: Person) => {\n    setPeople((list) => [...list, { ...d, access: newAccess }]);\n    setQuery(\"\");\n    setActive(0);\n    setSaved(false);\n  };\n\n  const ring = { [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.panel } as React.CSSProperties;\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const sel = cn(\"h-8 cursor-pointer rounded-lg border-0 bg-transparent px-1.5 text-[12.5px] hover:bg-[var(--h)]\", focus);\n  const avatar = (x: Person, size = 32) => (\n    <span className=\"grid shrink-0 place-items-center rounded-full font-semibold\" style={{ width: size, height: size, fontSize: size * 0.36, background: `${x.color}2e`, color: x.color }}>\n      {initials(x.name)}\n    </span>\n  );\n  const toggle = (on: boolean, set: (v: boolean) => void, label: string) => (\n    <button type=\"button\" role=\"switch\" aria-checked={on} aria-label={label} onClick={() => set(!on)} className={cn(\"relative h-5 w-9 shrink-0 cursor-pointer rounded-full border-0 transition-colors\", focus)} style={{ background: on ? p.green : p.track, ...ring }}>\n      <motion.span className=\"absolute top-0.5 h-4 w-4 rounded-full bg-white shadow\" initial={false} animate={{ left: on ? 18 : 2 }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 600, damping: 34 }} />\n    </button>\n  );\n  const g = GENERAL.find((x) => x.id === general)!;\n\n  return (\n    <section className={cn(\"@container relative min-h-[720px] w-full overflow-hidden\", className)} style={{ background: p.bg, color: p.text }}>\n      {/* Document behind */}\n      <div className=\"mx-auto max-w-3xl px-4 py-8 @[640px]:px-6\" aria-hidden={open}>\n        <div className=\"flex items-center justify-between gap-3\">\n          <div className=\"flex items-center gap-2.5\">\n            <span className=\"grid h-8 w-8 place-items-center rounded-lg text-[10px] font-bold\" style={{ background: \"#F59E0B22\", color: \"#F59E0B\" }}>\n              PPT\n            </span>\n            <span className=\"text-[15px] font-semibold\">{title}</span>\n          </div>\n          <div className=\"flex items-center gap-2\">\n            <span className=\"flex -space-x-2\">{people.slice(0, 4).map((x) => <span key={x.id} className=\"rounded-full border-2\" style={{ borderColor: p.bg }}>{avatar(x, 26)}</span>)}</span>\n            <button type=\"button\" onClick={() => setOpen(true)} className={cn(\"h-9 cursor-pointer rounded-lg border-0 px-3.5 text-[13px] font-medium\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n              Share\n            </button>\n          </div>\n        </div>\n        <div className=\"mt-6 aspect-video rounded-2xl\" style={{ background: p.ghost }} />\n      </div>\n\n      <AnimatePresence>\n        {open && (\n          <motion.div key=\"scrim\" initial={reduce ? false : { opacity: 0 }} animate={{ opacity: 1 }} exit={reduce ? undefined : { opacity: 0 }} className=\"absolute inset-0 z-20 flex items-start justify-center overflow-y-auto px-3 py-8 @[640px]:py-12\" style={{ background: p.scrim }} onMouseDown={(e) => e.target === e.currentTarget && setOpen(false)}>\n            <motion.div role=\"dialog\" aria-modal=\"true\" aria-labelledby={`${uid}-t`} initial={reduce ? false : { opacity: 0, y: 12, scale: 0.97 }} animate={{ opacity: 1, y: 0, scale: 1 }} exit={reduce ? undefined : { opacity: 0, y: 8, scale: 0.98 }} transition={{ type: \"spring\", stiffness: 460, damping: 36 }} className=\"w-full max-w-[520px] rounded-2xl border shadow-[0_24px_70px_-20px_rgba(0,0,0,0.7)]\" style={{ background: p.panel, borderColor: p.border }}>\n              <div className=\"flex items-center justify-between gap-3 px-5 pt-5\">\n                <h3 id={`${uid}-t`} className=\"m-0 min-w-0 truncate text-[17px] font-semibold\">\n                  Share “{title}”\n                </h3>\n                <button type=\"button\" onClick={() => setOpen(false)} aria-label=\"Close\" className={cn(\"grid h-8 w-8 shrink-0 cursor-pointer place-items-center rounded-lg border-0 bg-transparent\", focus)} style={{ color: p.muted, ...ring }}>\n                  <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                    <path d=\"M6 6l12 12M18 6 6 18\" />\n                  </svg>\n                </button>\n              </div>\n\n              <div className=\"px-5 pt-4\">\n                {/* Add people */}\n                <div className=\"relative\">\n                  <div className=\"flex items-center gap-1 rounded-xl border pr-1 pl-3 focus-within:border-[var(--f)]\" style={{ borderColor: p.border, background: p.input, [\"--f\" as string]: p.accent }}>\n                    <label htmlFor={`${uid}-q`} className=\"sr-only\">\n                      Add people\n                    </label>\n                    <input\n                      id={`${uid}-q`}\n                      value={query}\n                      onChange={(e) => {\n                        setQuery(e.target.value);\n                        setActive(0);\n                      }}\n                      onKeyDown={(e) => {\n                        if (!suggestions.length) return;\n                        if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\") {\n                          e.preventDefault();\n                          setActive((a) => (a + (e.key === \"ArrowDown\" ? 1 : -1) + suggestions.length) % suggestions.length);\n                        } else if (e.key === \"Enter\") {\n                          e.preventDefault();\n                          addPerson(suggestions[active]);\n                        } else if (e.key === \"Escape\") setQuery(\"\");\n                      }}\n                      role=\"combobox\"\n                      aria-expanded={suggestions.length > 0}\n                      aria-controls={`${uid}-sug`}\n                      aria-activedescendant={suggestions[active] ? `${uid}-s-${suggestions[active].id}` : undefined}\n                      placeholder=\"Add people by name or email\"\n                      autoComplete=\"off\"\n                      className=\"h-10 min-w-0 flex-1 border-0 bg-transparent text-[13.5px] outline-none\"\n                      style={{ color: p.text }}\n                    />\n                    <select value={newAccess} onChange={(e) => setNewAccess(e.target.value as Access)} aria-label=\"Access for new people\" className={sel} style={{ color: p.muted, [\"--h\" as string]: p.hover, ...ring }}>\n                      {ACCESS.map((a) => (\n                        <option key={a.id} value={a.id}>\n                          {a.label}\n                        </option>\n                      ))}\n                    </select>\n                  </div>\n                  <AnimatePresence>\n                    {suggestions.length > 0 && (\n                      <motion.ul key=\"sug\" id={`${uid}-sug`} role=\"listbox\" initial={reduce ? false : { opacity: 0, y: -4 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} transition={{ duration: 0.12 }} className=\"absolute inset-x-0 top-full z-10 m-0 mt-1.5 list-none rounded-xl border p-1.5 shadow-xl\" style={{ background: p.menu, borderColor: p.border }}>\n                        {suggestions.map((d, i) => (\n                          <li key={d.id} id={`${uid}-s-${d.id}`} role=\"option\" aria-selected={i === active} onMouseEnter={() => setActive(i)} onMouseDown={(e) => e.preventDefault()} onClick={() => addPerson(d)} className=\"flex cursor-pointer items-center gap-2.5 rounded-lg px-2 py-1.5\" style={{ background: i === active ? p.hover : \"transparent\" }}>\n                            {avatar(d, 28)}\n                            <span className=\"min-w-0\">\n                              <span className=\"block truncate text-[13px]\">{d.name}</span>\n                              <span className=\"block truncate text-[11.5px]\" style={{ color: p.faint }}>\n                                {d.email}\n                              </span>\n                            </span>\n                          </li>\n                        ))}\n                      </motion.ul>\n                    )}\n                  </AnimatePresence>\n                </div>\n\n                {/* People */}\n                <p className=\"m-0 mt-5 mb-1.5 text-[12px] font-medium\" style={{ color: p.faint }}>\n                  People with access\n                </p>\n                <ul className=\"m-0 list-none p-0\">\n                  <AnimatePresence initial={false}>\n                    {people.map((x) => (\n                      <motion.li key={x.id} layout={!reduce} initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} className=\"overflow-hidden\">\n                        <div className=\"flex items-center gap-3 py-1.5\">\n                          {avatar(x)}\n                          <span className=\"min-w-0 flex-1\">\n                            <span className=\"block truncate text-[13px]\">\n                              {x.name}\n                              {x.access === \"owner\" && <span style={{ color: p.faint }}> (you)</span>}\n                            </span>\n                            <span className=\"block truncate text-[11.5px]\" style={{ color: p.faint }}>\n                              {x.email}\n                            </span>\n                          </span>\n                          {x.access === \"owner\" ? (\n                            <span className=\"px-2 text-[12.5px]\" style={{ color: p.faint }}>\n                              Owner\n                            </span>\n                          ) : (\n                            <select\n                              value={x.access}\n                              onChange={(e) => {\n                                setSaved(false);\n                                if (e.target.value === \"remove\") setPeople((l) => l.filter((y) => y.id !== x.id));\n                                else setPeople((l) => l.map((y) => (y.id === x.id ? { ...y, access: e.target.value as Access } : y)));\n                              }}\n                              aria-label={`Access for ${x.name}`}\n                              className={sel}\n                              style={{ color: p.text, [\"--h\" as string]: p.hover, ...ring }}\n                            >\n                              {ACCESS.map((a) => (\n                                <option key={a.id} value={a.id}>\n                                  {a.label}\n                                </option>\n                              ))}\n                              <option value=\"remove\">Remove access</option>\n                            </select>\n                          )}\n                        </div>\n                      </motion.li>\n                    ))}\n                  </AnimatePresence>\n                </ul>\n\n                {/* General access */}\n                <p className=\"m-0 mt-5 mb-2 text-[12px] font-medium\" style={{ color: p.faint }}>\n                  General access\n                </p>\n                <div className=\"flex items-center gap-3 rounded-xl p-2.5\" style={{ background: p.ghost }}>\n                  <motion.span key={general} initial={reduce ? false : { scale: 0.7 }} animate={{ scale: 1 }} className=\"grid h-9 w-9 shrink-0 place-items-center rounded-full\" style={{ background: general === \"restricted\" ? p.track : `${p.green}22`, color: general === \"restricted\" ? p.muted : p.green }}>\n                    <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <path d={g.icon} />\n                    </svg>\n                  </motion.span>\n                  <div className=\"min-w-0 flex-1\">\n                    <select value={general} onChange={(e) => setGeneral(e.target.value as General)} aria-label=\"General access\" className={cn(sel, \"-ml-1.5 h-7 font-medium\")} style={{ color: p.text, [\"--h\" as string]: p.hover, ...ring }}>\n                      {GENERAL.map((x) => (\n                        <option key={x.id} value={x.id}>\n                          {x.id === \"workspace\" ? `${x.label} ${workspace}` : x.label}\n                        </option>\n                      ))}\n                    </select>\n                    <p className=\"m-0 text-[12px]\" style={{ color: p.faint }} aria-live=\"polite\">\n                      {g.hint(workspace)}\n                    </p>\n                  </div>\n                  {general !== \"restricted\" && (\n                    <select value={linkAccess} onChange={(e) => setLinkAccess(e.target.value as Access)} aria-label=\"Access for general\" className={sel} style={{ color: p.text, [\"--h\" as string]: p.hover, ...ring }}>\n                      {ACCESS.map((a) => (\n                        <option key={a.id} value={a.id}>\n                          {a.label}\n                        </option>\n                      ))}\n                    </select>\n                  )}\n                </div>\n\n                {/* Link settings */}\n                <button type=\"button\" onClick={() => setAdvanced((a) => !a)} aria-expanded={advanced} className={cn(\"mt-3 flex cursor-pointer items-center gap-1.5 rounded border-0 bg-transparent p-0 text-[12.5px]\", focus)} style={{ color: p.muted, ...ring }}>\n                  <motion.svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" animate={{ rotate: advanced ? 90 : 0 }} aria-hidden=\"true\">\n                    <path d=\"m9 6 6 6-6 6\" />\n                  </motion.svg>\n                  Link settings\n                  {(expires || locked || noDownload) && <span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: p.accent }} />}\n                </button>\n                <AnimatePresence initial={false}>\n                  {advanced && (\n                    <motion.div key=\"adv\" initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} className=\"overflow-hidden\">\n                      <div className=\"mt-2 flex flex-col gap-3 rounded-xl border p-3\" style={{ borderColor: p.border }}>\n                        <div className=\"flex items-center justify-between gap-3\">\n                          <span className=\"text-[13px]\">Link expires</span>\n                          <span className=\"flex items-center gap-2\">\n                            {expires && <input type=\"date\" value={expiry} min=\"2026-11-02\" onChange={(e) => setExpiry(e.target.value)} aria-label=\"Expiry date\" className={cn(\"h-7 rounded-md border px-2 text-[12px] [color-scheme:var(--cs)]\", focus)} style={{ borderColor: p.border, background: p.input, color: p.text, [\"--cs\" as string]: theme, ...ring }} />}\n                            {toggle(expires, setExpires, \"Link expires\")}\n                          </span>\n                        </div>\n                        <div className=\"flex items-center justify-between gap-3\">\n                          <span className=\"text-[13px]\">Require a password</span>\n                          <span className=\"flex items-center gap-2\">\n                            {locked && <input type=\"password\" value={pass} onChange={(e) => setPass(e.target.value)} placeholder=\"Password\" aria-label=\"Link password\" autoComplete=\"new-password\" className={cn(\"h-7 w-28 rounded-md border px-2 text-[12px]\", focus)} style={{ borderColor: locked && pass.length < 4 ? p.amber : p.border, background: p.input, color: p.text, ...ring }} />}\n                            {toggle(locked, setLocked, \"Require a password\")}\n                          </span>\n                        </div>\n                        <div className=\"flex items-center justify-between gap-3\">\n                          <span className=\"text-[13px]\">Block downloads and copying</span>\n                          {toggle(noDownload, setNoDownload, \"Block downloads and copying\")}\n                        </div>\n                      </div>\n                    </motion.div>\n                  )}\n                </AnimatePresence>\n              </div>\n\n              <div className=\"mt-5 flex flex-wrap items-center justify-between gap-3 border-t px-5 py-4\" style={{ borderColor: p.border }}>\n                <button\n                  type=\"button\"\n                  onClick={() => {\n                    navigator.clipboard?.writeText(`https://nexora.app/d/q4-board-deck`).catch(() => {});\n                    setCopied(true);\n                  }}\n                  className={cn(\"flex h-9 cursor-pointer items-center gap-1.5 rounded-lg border bg-transparent px-3 text-[13px]\", focus)}\n                  style={{ borderColor: p.border, color: copied ? p.green : p.text, ...ring }}\n                >\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                    <path d={GENERAL[2].icon} />\n                  </svg>\n                  {copied ? \"Link copied\" : \"Copy link\"}\n                </button>\n                <div className=\"flex items-center gap-3\">\n                  <label className=\"flex cursor-pointer items-center gap-2 text-[12.5px] has-[:focus-visible]:underline\" style={{ color: p.muted }}>\n                    <input type=\"checkbox\" checked={notify} onChange={(e) => setNotify(e.target.checked)} className=\"h-4 w-4 cursor-pointer\" style={{ accentColor: p.on }} />\n                    Notify people\n                  </label>\n                  <button\n                    type=\"button\"\n                    onClick={() => {\n                      onSave?.({ people: people.map((x) => ({ email: x.email, access: x.access })), general, linkAccess, notify });\n                      setSaved(true);\n                      setOpen(false);\n                    }}\n                    className={cn(\"h-9 cursor-pointer rounded-lg border-0 px-4 text-[13px] font-medium\", focus)}\n                    style={{ background: p.on, color: p.onText, ...ring }}\n                  >\n                    {changes ? \"Save\" : \"Done\"}\n                  </button>\n                </div>\n              </div>\n            </motion.div>\n          </motion.div>\n        )}\n      </AnimatePresence>\n      <AnimatePresence>\n        {saved && !open && (\n          <motion.div key=\"toast\" role=\"status\" initial={reduce ? false : { opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} className=\"absolute bottom-6 left-1/2 -translate-x-1/2 rounded-full border px-3.5 py-1.5 text-[12.5px]\" style={{ background: p.panel, borderColor: p.border }}>\n            Sharing updated{notify ? \" · people were notified\" : \"\"}\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </section>\n  );\n}\n\nexport default ShareSettingsModal;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}