import { Bookmark } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { cn } from "@/lib/utils";

interface ChatMessageBookmarkProps {
  messageId: string;
  conversationId: string;
  isBookmarked: boolean;
  onToggle: () => void;
}

export function ChatMessageBookmark({ isBookmarked, onToggle }: ChatMessageBookmarkProps) {
  return (
    <Tooltip>
      <TooltipTrigger asChild>
        <Button
          variant="ghost"
          size="icon"
          className="h-6 w-6"
          onClick={onToggle}
          aria-label={isBookmarked ? "Remove bookmark" : "Bookmark message"}
        >
          <Bookmark
            className={cn(
              "h-3.5 w-3.5",
              isBookmarked && "fill-current",
            )}
          />
        </Button>
      </TooltipTrigger>
      <TooltipContent>{isBookmarked ? "Remove bookmark" : "Bookmark message"}</TooltipContent>
    </Tooltip>
  );
}
