"use client"; import { MessageSquare } from "lucide-react"; import { Drawer, DrawerContent, DrawerHandle, DrawerHeader, DrawerTitle, } from "@/components/ui/drawer"; import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import { cn } from "@/lib/utils"; import { CommentPanelContainer } from "../comment-panel-container/comment-panel-container"; import type { CommentSheetProps } from "./types"; export function CommentSheet({ messageId, isOpen, onOpenChange, commentCount = 0, side = "bottom", }: CommentSheetProps) { const isBottomSheet = side === "bottom"; // Use Drawer for mobile (bottom), Sheet for medium screens (right) if (isBottomSheet) { return ( Comments {commentCount > 0 && ( {commentCount} )}
); } // Use Sheet for medium screens (right side) return ( Comments {commentCount > 0 && ( {commentCount} )}
); }