// node modules
import React from "react";
import { Meta, Story } from "@storybook/react";

// local components
import { Paywall, PaywallProps } from "../components/paywall";

export default {
    title: 'Example/Paywall',
} as Meta;

const PaywallTpl: Story<PaywallProps> = (args) => (
    <div style={{ margin: '0 auto', width: 378 }}>
        <Paywall {...args} />
    </div>
);

export const paywall = PaywallTpl.bind({});

paywall.args = {
    accessPaymentsKeys: {
        checkoutPayKey: 'pk_test_33acfb26-aead-4343-af11-0b1029cab4fe',
        braintreeAuthorization: 'sandbox_jy4v3cfy_2j94xsqgx8tssvrw',
        amazonSellerId: 'AKZ8CCAM2BLPW',
        amazonClientId: 'amzn1.application-oa2-client.336f5cacc3c742a18eee9247ef6937b9'
    },
    countryCode: 'US',
    stripeProp: {
        price: 10,
        currency: 'USD'
    },
    isPaypalActive: true,
    isAmazonActive: true,
    env: 'development',
    onAmazonButtonClicked: () => {
        console.log('amazonButtonClicked')
    },
    onSubmit: (props: any) => {
        console.log(props)
    }
}
