import {fn} from 'storybook/test'

import {Touchable} from '../components/atoms/touchable'

import type {Meta, StoryObj} from '@storybook/react-vite'

const meta = {
  title: 'Atoms/Touchable',
  component: Touchable,
  parameters: {},
  tags: ['autodocs'],
  argTypes: {
    stopPropagation: {
      control: 'boolean',
    },
  },
  args: {
    onClick: fn(),
    stopPropagation: false,
  },
} satisfies Meta<typeof Touchable>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
  args: {
    children: <div>Click me</div>,
  },
}

export const WithStyledChild: Story = {
  args: {
    children: (
      <div className="bg-secondary text-white p-4 rounded-md cursor-pointer hover:bg-secondary/90 transition-colors">
        Custom styled touchable
      </div>
    ),
  },
}
