'use client'; import { Loader2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { ChatRoomAvatarDisplay } from '@/components/family/chat-room-avatar-display'; import type { ChatRoom } from '@/lib/api'; import { roomDisplayLabel } from '@/lib/family-chat'; interface ChatForwardDialogProps { open: boolean; onOpenChange: (open: boolean) => void; rooms: ChatRoom[]; viewerUserId: string; token: string | null; currentRoomId?: string; forwarding?: boolean; onSelectRoom: (roomId: string) => void; } export function ChatForwardDialog({ open, onOpenChange, rooms, viewerUserId, token, currentRoomId, forwarding, onSelectRoom }: ChatForwardDialogProps) { const targets = rooms.filter((room) => room.id !== currentRoomId && room.type !== 'BOT'); return ( Переслать в чат {forwarding ? (
Пересылка...
) : (
{targets.length ? ( targets.map((room) => ( )) ) : (

Нет доступных чатов для пересылки

)}
)}
); }