import React from 'react';
import { Select } from './Select';
import { action } from '@storybook/addon-actions';

export default {
  title: 'Base/Select',
  component: Select,
  argTypes: {
    label: { control: 'text' }, // Makes 'label' editable in Storybook controls
    onChange: { action: 'onChange'},
  },
};

export const Default = (args) => {
  const options = [
    { value: '1', label: '1 seat' },
    { value: '2', label: '2 seats' },
    { value: '3', label: '3 seats' },
  ];

  return (
    <Select
      {...args}
      options={options}
      onChange={(e) => {
        args.onChange(e); 
      }}
    />
  );
};

Default.args = {
  label: 'Choose a seat',
};


