"use client"; import { motion } from "framer-motion"; import { ArrowRight, ImageIcon } from "lucide-react"; import { AgentWorkflowParticleScatter } from "@/components/agents/AgentWorkflowParticleScatter"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { defaultAgentWorkflowShowcaseConfig } from "@/lib/agents/workflow-showcase-config"; import type { AgentWorkflowShowcaseConfig } from "@/types/agent"; interface AgentWorkflowShowcaseBannerProps { config?: AgentWorkflowShowcaseConfig | null; onActionClick?: () => void; actionLabel?: string; secondaryActionLabel?: string; onSecondaryActionClick?: () => void; className?: string; } export function AgentWorkflowShowcaseBanner({ config, onActionClick, actionLabel, secondaryActionLabel, onSecondaryActionClick, className, }: AgentWorkflowShowcaseBannerProps) { const resolved = config || defaultAgentWorkflowShowcaseConfig; const hasVideo = Boolean(resolved.videoUrl); const hasPoster = Boolean(resolved.posterUrl); const shouldRenderMedia = resolved.enabled !== false && (hasVideo || hasPoster); const resolvedActionLabel = actionLabel || resolved.actionText; return (

{resolved.title}

{resolved.subtitle}

{resolvedActionLabel || secondaryActionLabel ? (
{resolvedActionLabel ? ( ) : null} {secondaryActionLabel ? ( ) : null}
) : null}
{shouldRenderMedia ? (
{hasVideo ? (
{resolved.overlayText ? (
{resolved.overlayText}
) : null}
视频海报
{hasVideo || hasPoster ? (
固定比例 10:3
) : null}
{resolved.footerText ? (
{resolved.footerText}
) : null} ) : null}
); }