import React from 'react';
import { Meta, Story } from '@storybook/react';
import { AtomCountryPicker, ICountryPickerProps } from 'react/atoms/CountryPicker';

const meta: Meta = {
  title: 'React/atoms',
  component: AtomCountryPicker,
  argTypes: {
    onChange: {table: {disable: true}},
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateCountryPicker: Story<ICountryPickerProps> = (props) => <AtomCountryPicker {...props} />;

// By passing using the Args format for exported stories, you can control the props for a component for reuse in a test
// https://storybook.js.org/docs/react/workflows/unit-testing
export const CountryPicker = TemplateCountryPicker.bind({});

CountryPicker.args = {
  disabled: false,
  value: 'COL',
  importantItems: ['COL', 'ECU', 'MEX']
};
