import type { Meta, StoryObj } from '@storybook/react';
import { MarkdownMessage } from './MarkdownMessage';

const meta: Meta<typeof MarkdownMessage> = {
  title: 'Assistant/MarkdownMessage',
  component: MarkdownMessage,
};

export default meta;
type Story = StoryObj<typeof MarkdownMessage>;

export const Default: Story = {
  args: {
    content: `
# Markdown Message Example

This component renders **Markdown** content sent by the AI assistant.

- It supports **bold** and _italic_ text.
- It supports [links](https://xertica.com).
- It supports code blocks:

\`\`\`javascript
function hello() {
  console.log("Hello, Xertica!");
}
\`\`\`

> "The advance of technology is based on making it fit in so that you don't even notice it, so it's part of everyday life." - Bill Gates
    `.trim(),
  },
};

export const Short: Story = {
  args: {
    content: '**Short message** with some `inline code`.',
  },
};

export const Table: Story = {
  args: {
    content: `
| Project | Status | Health |
|---|---|---|
| Analytics V2 | Active | ✅ Healthy |
| CRM Refactor | On Hold | ⚠️ Warning |
| Mobile App | Completed | 🏆 Done |
    `.trim(),
  },
};
