import { downloadToCSV, type DownloadItem } from '../actions' import type { MarkdownWidgetConfig, MarkdownWidgetData } from './types' /** * Creates download configuration for markdown widgets, supporting CSV export of text content. Does not require `refUI` since it only exports text. * * @returns Array of download items for use with the Download action. */ export function markdownDownloadConfig(): DownloadItem[] { return [ { ...downloadToCSV, modifier: async (data) => { const content = data?.content ?? '' return downloadToCSV.modifier([['Content'], [content]]) }, }, ] } /** * Returns the default configuration for markdown content display widgets. * * @returns Default markdown widget config (empty object). */ export function markdownConfig(): MarkdownWidgetConfig { return {} }