import { Meta, Story } from '@storybook/react';
import React from 'react';
import {
  IImageCarouselProps,
  ITextImageProps,
  ImageCarousel,
} from '../../../components/ImageCarousel/ImageCarousel';
import image from '../../../components/ImageCarousel/images/001.png';
import { RPGUIRoot } from '../../../components/RPGUI/RPGUIRoot';

const meta: Meta = {
  title: 'UI/Images/Image Carousel',
  component: ImageCarousel,
};

export default meta;

const Template: Story<IImageCarouselProps> = args => {
  return (
    <RPGUIRoot>
      <ImageCarousel {...args} />
    </RPGUIRoot>
  );
};

export const OverlayImageWithText = Template.bind({});
export const ImageGallery = Template.bind({});

const OverlayImageWithTextProps: ITextImageProps[] = [
  {
    image: image,
    textPosition: 'flex-start',
    text:
      '123Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s.',
  },
  {
    image: image,
    textPosition: 'flex-end',
    text:
      '456Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s',
  },
  {
    image: image,
    textPosition: 'flex-start',
    text:
      'text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.',
  },
];

const ImageGalleryProps: ITextImageProps[] = [
  {
    image: image,
    text:
      '123Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s.',
  },
  {
    image: image,
    text:
      '456Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s',
  },
  {
    image: image,
    text:
      'text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.',
  },
];

ImageGallery.args = {
  textImage: ImageGalleryProps,
  isTextFixed: true,
};

OverlayImageWithText.args = {
  textImage: OverlayImageWithTextProps,
  isTextFixed: false,
};
