import React from "react";
import { Meta, Story } from "@storybook/react";
import { IMoleculeInputProps, MoleculeInput } from "react/molecules/Input";

const meta: Meta = {
  title: "React/molecules/Input",
  component: MoleculeInput,
  argTypes: {},
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateInput: Story<IMoleculeInputProps> = (props) => (
  <MoleculeInput {...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 Input = TemplateInput.bind({});

Input.args = {
  type: "Text",
  label: "Sample label",
  labelCountryPicker: "Country Picker",
  helperText: "helperText",
  importantCountries: ["COL", "ECU", "MEX"],
};
