import { useState, useEffect, useCallback } from 'react'; import { api } from '../utils/api.js'; import { useToast } from '../contexts/ToastContext.jsx'; import Avatar from './Avatar.jsx'; // ── Shared user checkbox list ───────────────────────────────────────────────── function UserCheckList({ allUsers, selectedIds, onChange }) { const [search, setSearch] = useState(''); const filtered = allUsers.filter(u => (u.display_name || u.name).toLowerCase().includes(search.toLowerCase()) ); return (
A matching Direct Message group will be created automatically.
}{members.size} selected
Delete {selected?.name}? This also deletes the associated direct message group. Cannot be undone.
Select two or more user groups. All members of each group will have access to this conversation.
{groupIds.size} group{groupIds.size !== 1 ? 's' : ''} selected
Delete {selected?.name}? This also deletes the associated direct message group. Cannot be undone.