"use client" import type { LibraryItem } from "@/lib/mock/library" import { Button } from "@/components/ui/button" import { Tip } from "@/components/ui/tip" import { cn } from "@/lib/utils" import { isLibraryItemFavorite } from "@/lib/library-nav" /** Parent must use this class so non-favorited stars show on row/cell hover (`group-hover/favcell`). */ export const LIBRARY_FAVORITE_HOVER_GROUP = "group/favcell" export function LibraryFavoriteButton({ row, onToggleFavorite, stopPropagation = true, }: { row: LibraryItem onToggleFavorite: (row: LibraryItem) => void stopPropagation?: boolean }) { const fav = isLibraryItemFavorite(row) const label = fav ? "Remove from favorites" : "Add to favorites" return ( ) }