"use client" import Link from "next/link" import { BookOpen, BookMarked, BookmarkCheck } from "lucide-react" import { Button } from "@/components/ui/button" import { useAuth } from "@/lib/auth-context" import { useBookmarks } from "@/lib/bookmark-context" interface NovelDetailActionsProps { novelId: string novelSlug: string firstChapterNumber?: number } export function NovelDetailActions({ novelId, novelSlug, firstChapterNumber }: NovelDetailActionsProps) { const { user } = useAuth() const { isBookmarked, toggleBookmark, getProgress } = useBookmarks() const bookmarked = isBookmarked(novelId) const progress = getProgress(novelId) const readLink = progress?.lastChapterNumber ? `/truyen/${novelSlug}/${progress.lastChapterNumber}` : firstChapterNumber ? `/truyen/${novelSlug}/${firstChapterNumber}` : "#" return (
{user ? ( ) : ( )}
) }