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

const meta: Meta<typeof Markdown> = {
  title: 'Components/Markdown',
  component: Markdown,
  tags: ['autodocs'],
}
export default meta
type Story = StoryObj<typeof Markdown>

export const BasicText: Story = {
  args: { content: 'Hello **world**! This is *italic* text.' },
}

export const CodeBlock: Story = {
  args: { content: '```python\ndef greet(name):\n    return f"Hello, {name}"\n```' },
}

export const List: Story = {
  args: { content: '- First item\n- Second item\n- Third item' },
}

export const Headings: Story = {
  args: { content: '# Title\n## Subtitle\n### Section\nParagraph text.' },
}

export const Links: Story = {
  args: { content: 'Visit [FusionAGI](https://github.com/fusionagi) for docs.' },
}

export const Mixed: Story = {
  args: {
    content: '## Code Example\n\nHere is a function:\n\n```javascript\nconst add = (a, b) => a + b\n```\n\n- Works with numbers\n- Returns sum\n\n**Note:** This is zero-dependency.',
  },
}
