import type { Meta, StoryObj } from '@storybook/react';
import { Separator } from './separator';
import React from 'react';

const meta: Meta<typeof Separator> = {
  title: 'UI/Separator',
  component: Separator,
  render: args => <Separator {...args} />,
  argTypes: {
    orientation: {
      control: 'select',
      options: ['horizontal', 'vertical'],
      description: 'The orientation of the separator.',
      defaultValue: 'horizontal',
    },
    decorative: {
      control: 'boolean',
      description: 'Whether the separator is decorative.',
    },
  },
};

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

export const Horizontal: Story = {
  render: args => (
    <div>
      <div className="space-y-1">
        <h4 className="text-sm font-medium leading-none">Radix UI</h4>
        <p className="text-sm text-muted-foreground">An open-source UI component library.</p>
      </div>
      <Separator {...args} className="my-4" />
      <div className="flex h-5 items-center space-x-4 text-sm">
        <div>Blog</div>
        <Separator orientation="vertical" />
        <div>Docs</div>
        <Separator orientation="vertical" />
        <div>Source</div>
      </div>
    </div>
  ),
};

export const Vertical: Story = {
  render: () => (
    <div className="flex h-5 items-center space-x-4 text-sm">
      <div>Dashboard</div>
      <Separator orientation="vertical" />
      <div>Settings</div>
      <Separator orientation="vertical" />
      <div>Help</div>
    </div>
  ),
};
