import React from "react";
import { Meta, Story } from "@storybook/react";
import { OrganismPromoCode, IPromoCodeProps } from "native/organisms/PromoCode";
import { action } from "@storybook/addon-actions";

const meta: Meta = {
  title: "React Native/organisms/PromoCode",
  component: OrganismPromoCode,
  argTypes: {
    handlePress: {
      control: false,
    },
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplatePromoCode: Story<IPromoCodeProps> = (props) => (
  <OrganismPromoCode {...props} />
);

export const PromoCode = TemplatePromoCode.bind({});

PromoCode.args = {
  headline: "You have a Promocode?",
  text: "Enter the code in the input below to activate the benefits of the promocode you want to redeem. Cheers!",
  errorMessageText: "The Promocode you entered is invalid, try again",
  handlePress: action("handlePress"),
};
