import { Meta, StoryObj } from '@storybook/react-webpack5';
import { createSandboxStory } from '../../.storybook/components/sandbox/SandboxEditor';

import { Size, Status } from '../common';

import ProcessIndicator from './ProcessIndicator';

export default {
  component: ProcessIndicator,
  title: 'Loading/ProcessIndicator',
} satisfies Meta<typeof ProcessIndicator>;

type Story = StoryObj<typeof ProcessIndicator>;

export const Sandbox = createSandboxStory({
  code: `<ProcessIndicator
  status={Status.PROCESSING}
  size={Size.EXTRA_SMALL}
  onAnimationCompleted={(status) => console.log(status)}
/>`,
  scope: { ProcessIndicator },
});

export const Basic: Story = {
  args: {
    size: Size.EXTRA_SMALL,
    status: Status.PROCESSING,
  },
};
