"use client"; import { Badge } from "@/components/ui/badge"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { useFormContext } from "react-hook-form"; export const PipelineSummary = () => { const { getValues } = useFormContext(); const values = getValues(); const tags = values.tags ? values.tags .split(",") .map((tag: string) => tag.trim()) // trim each tag .filter(Boolean) // filter out empty strings : []; return ( Pipeline Summary A quick overview of the pipeline configuration. Review before launching. {/* details */}

Pipeline Details

Name: {values.name || "—"}
Description: {values.description || "—"}
Tags:
{tags.length > 0 ? ( tags.map((tag: string, index: number) => ( {tag} )) ) : (
No tags added
)}
{/* data sources */}

Data Sources

{values.dataSources && values.dataSources.length > 0 ? (
    {values.dataSources.map((src: string, index: number) => (
  • {src}
  • ))}
) : (
No data sources added.
)}
{/* AI Assistant */}

AI Assistant

Prompt: {values.aiPrompt || "—"}
Mode: {values.aiMode || "Default"}
{/* schedule */}

Schedule

Frequency: {values.schedule || "—"}
Start Date: {values.startDate || "—"}
Timezone: {values.timezone || "—"}
{/* form Inputs */}

Form Inputs

No input fields added yet.
); };