"use client"; import type { ReactNode } from "react"; import { ArrowLeft, Images, Layers, LayoutGrid, Wand2 } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; interface AgentCanvasTopNavDarkProps { siteName?: string | null; siteLogo?: string | null; siteLogoDark?: string | null; onBack?: () => void; rightSlot?: ReactNode; activeKey?: "featured" | "agent" | "canvas" | "gallery"; batchProcessingEnabled?: boolean; } const NAV_ITEMS = [ { key: "featured" as const, label: "批量处理", icon: Layers, onClick: () => window.location.assign(`/canvas/${crypto.randomUUID()}?batch=1`), }, { key: "agent" as const, label: "风格化", icon: Wand2, onClick: () => window.location.assign("/canvas?mode=agent"), }, { key: "canvas" as const, label: "无限画布", icon: LayoutGrid, onClick: () => window.location.assign(`/canvas/${crypto.randomUUID()}`), }, { key: "gallery" as const, label: "我的图册", icon: Images, onClick: () => window.location.assign("/gallery"), }, ]; export function AgentCanvasTopNavDark({ siteName = "AI Chatbot", siteLogo, siteLogoDark, onBack, rightSlot = null, activeKey = "agent", batchProcessingEnabled = true, }: AgentCanvasTopNavDarkProps) { const resolvedSiteName = String(siteName || "AI Chatbot").trim() || "AI Chatbot"; const displayLogo = siteLogoDark?.trim() || siteLogo?.trim() || ""; const shouldInvertLogo = !siteLogoDark?.trim() && Boolean(siteLogo?.trim()); return (
{onBack ? ( ) : null}
{rightSlot ?
{rightSlot}
: null}
); }