import { type Meta, type StoryObj } from '@storybook/angular';
import { ProgressBarComponent, ProgressBarMode } from '@isa/ui/progress-bar';

export interface ProgressBarComponentInputs {
  value: number;
  maxValue: number;
  mode: ProgressBarMode;
}

const meta: Meta<ProgressBarComponentInputs> = {
  component: ProgressBarComponent,
  title: 'ui/progress-bar/ProgressBar',
  argTypes: {
    value: {
      control: 'number',
    },
    maxValue: {
      control: 'number',
    },
    mode: {
      control: 'select',
      options: Object.values(ProgressBarMode),
    },
  },
  args: {
    value: 50,
    maxValue: 100,
    mode: ProgressBarMode.Determinate,
  },
};

export default meta;

type Story = StoryObj<ProgressBarComponentInputs>;

export const Determinate: Story = {
  args: {
    mode: ProgressBarMode.Determinate,
    value: 30,
  },
};
