import Link from 'next/link'; import { Bookmark, FolderPlus, GitCompareArrows, Sparkles } from 'lucide-react'; import { toggleWatchAction } from '@/lib/account/actions'; import { cn } from '@/lib/format'; /** * Asset actions: Watch (server action, signs in first when anonymous), Add to collection, Compare, * Ask AI. Rendered inline on desktop and as a sticky bottom bar on phones (ยง165). */ export function AssetActions({ assetId, slug, watched = false, variant = 'inline', className }: { assetId: string; slug: string; watched?: boolean; variant?: 'inline' | 'bar'; className?: string }) { const back = `/asset/${slug}`; const btn = variant === 'bar' ? 'flex flex-1 flex-col items-center justify-center gap-0.5 rounded-md py-1.5 text-[10px] font-medium text-muted active:bg-inset' : 'inline-flex h-9 items-center gap-1.5 rounded-md border border-border bg-elevated px-3 text-[12px] font-medium text-fg hover:bg-inset'; const icon = variant === 'bar' ? 'h-5 w-5' : 'h-3.5 w-3.5'; return (
{variant === 'bar' ? 'Collect' : 'Add to collection'} Compare Ask AI
); }