import React from "react";
import { Meta, Story } from "@storybook/react";
import {
  IReadReferralProps,
  OrganismReadReferralCode,
} from "native/organisms/ReadReferralCode";
import { View } from "react-native";
import { action } from "@storybook/addon-actions";

const meta: Meta = {
  title: "React Native/organisms/ReadReferralCode",
  component: OrganismReadReferralCode,
  argTypes: {
    handleClick: { table: { disable: true } },
    skipFunction: { table: { disable: true } },
  },
  parameters: {
    controls: { expanded: true },
  },
};

export default meta;

const TemplateReadReferralCode: Story<IReadReferralProps> = (props) => (
  <View style={{ maxWidth: 310 }}>
    <OrganismReadReferralCode {...props} />
  </View>
);

export const ReadReferralCode = TemplateReadReferralCode.bind({});

ReadReferralCode.args = {
  text: "Enter their code for 250 points. If not “Skip” to continue.",
  handleClick: action("handleClick"),
  skipFunction: action("skipFunction"),
};
