/* Brainstorm X — Invite collaborators + share link. */ (function () { const { useState } = React; const DS = window.BrainstormXDesignSystem_f2a458; const { Button, Card, Input, Textarea, Chip, Avatar, AvatarStack, Badge } = DS; const I = window.BXIcons; function Invite({ goto, project = 'Pickle Paws', session, addMembers }) { const existing = (session && session.members) || window.BXpeople; const [emails, setEmails] = useState([]); const [val, setVal] = useState(''); const [sent, setSent] = useState(false); const [copied, setCopied] = useState(false); const add = (e) => { e.preventDefault(); const v = val.trim(); if (v && !emails.includes(v)) setEmails([...emails, v]); setVal(''); }; const send = async () => { if (addMembers && emails.length) await addMembers(emails); setSent(true); setEmails([]); }; const share = 'brainstorm-x.app/s/' + ((session && session.id) || 'pickle-paws-9f3'); return (
Brainstorm X
Invite your team

Bring your team into {project}

Naming is better when people can react quickly. Invite collaborators so they can vote, comment and help shape the strongest ideas.

Already in this session
{existing.map((m) => ( {m.name} {m.role || 'Editor'} ))}
Invite by email
setVal(e.target.value)} iconLeft={} />
{emails.map((em) => ( setEmails(emails.filter((x) => x !== em))} accent="var(--neon-violet)"> {em} ))}
Optional invite note