import { faker } from '@faker-js/faker';
import { Meta, StoryObj } from '@storybook/react';
import React from 'react';
import { InfoTooltip } from './InfoTooltip';

const childrenOptions = {
  'Lorem Ipsum': faker.lorem.sentences(4),
  'Custom Component': (
    <div>
      <span>{faker.lorem.sentences(4)}</span>{' '}
      <a href="https://portal.axinom.com">Axinom Mosaic</a>
    </div>
  ),
};

const meta: Meta<typeof InfoTooltip> = {
  title: 'Other Components/InfoTooltip',
  component: InfoTooltip,
  argTypes: {
    children: {
      options: Object.keys(childrenOptions),
      mapping: childrenOptions,
      control: {
        type: 'select',
      },
    },
  },
  args: { children: childrenOptions['Lorem Ipsum'] },
};
export default meta;

export const Default: StoryObj<typeof InfoTooltip> = {
  args: {
    children: faker.lorem.sentences(4),
  },
};
