import React from 'react'; import { FileTextIcon } from 'lucide-react'; import type { ArticleStatus, ArticleSummary, } from '../../../service/visibility/visibility.interface'; import { Button } from '../../ui/button'; import { cn } from '../cn'; /** What each status looks like, in the vocabulary of the Contents page. */ const STATUS_STYLE: Record = { pending: { label: 'Queued', chip: 'bg-muted text-muted-foreground' }, generating: { label: 'Writing', chip: 'bg-brand/10 text-brand' }, ready: { label: 'Ready', chip: 'bg-emerald-500/15 text-emerald-600' }, failed: { label: 'Failed', chip: 'bg-amber-400/20 text-amber-700' }, published: { label: 'Live', chip: 'bg-emerald-500/15 text-emerald-600' }, }; /** * The content written for this brand, beside the conversation: what is ready * to read, what is still being written, and what is already live. Opening a * piece is the page's job - this is the shelf, not the reader. * * @param props - Component props. * @param props.articles - The brand's content, newest first. * @param props.onAsk - Put a question to the copilot. * @param props.onOpen - Open one piece. * @return The panel. */ export function ContentPanel({ articles, onAsk, onOpen, }: { articles: ArticleSummary[]; onAsk: (prompt: string) => void; onOpen: (articleId: string) => void; }): React.ReactElement { if (articles.length === 0) { return (

Nothing written yet. Reco writes against the questions shoppers ask AI engines about your kind of store.

); } return ( ); }