import * as React from 'react'
import type { StoryFn, Meta } from '@storybook/react-webpack5'
import { GridCellBase } from '.'
import { Tooltip } from '@planview/pv-uikit'
import { CellBoundsPreview } from '../../docs/helpers'

export default {
    title: 'pv-grid/Components/Cells/GridCellBase',
    tags: ['autodocs'],
    component: GridCellBase,
    parameters: {
        badges: ['intl'],
    },
    args: {
        children: 'Cell content',
    },
    argTypes: {},
    decorators: [(Story) => <CellBoundsPreview>{Story()}</CellBoundsPreview>],
} satisfies Meta<typeof GridCellBase>

export const Default: StoryFn<typeof GridCellBase> = (props) => (
    <GridCellBase {...props} />
)

export const ExampleWithTooltip: StoryFn<typeof GridCellBase> = (props) => (
    <Tooltip unwrapped text="This is custom content">
        <GridCellBase {...props} />
    </Tooltip>
)
