"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("@storybook/react");
var React = __importStar(require("react"));
var storybook_react_router_1 = __importDefault(require("storybook-react-router"));
var apollo_storybook_react_1 = __importDefault(require("apollo-storybook-react"));
var styled_components_1 = __importDefault(require("styled-components"));
var web3_providers_http_1 = __importDefault(require("web3-providers-http"));
var TokensTabBuy_1 = require("./TokensTabBuy");
var CivilContext_1 = require("../../context/CivilContext");
var UniswapBuy_1 = require("./UniswapBuy");
var AirswapBuyCVL_1 = require("./AirswapBuyCVL");
var TokensTabBuyComplete_1 = require("./TokensTabBuyComplete");
var web3_1 = __importDefault(require("web3"));
exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  align-items: center;\n  diplay: flex;\n  height: 250px;\n  justifiy-content: center;\n  width: 100%;\n  max-width: 720px;\n"], ["\n  align-items: center;\n  diplay: flex;\n  height: 250px;\n  justifiy-content: center;\n  width: 100%;\n  max-width: 720px;\n"])));
var typeDefs = "\n  type Query {\n    storefrontEthPrice: Float\n    storefrontCvlPrice: Float\n    storefrontCvlQuoteUsd(usdToSpend: Float!): Float\n  }\n\n  schema {\n    query: Query\n  }\n";
var mocks = {
    Query: function () {
        return {
            storefrontEthPrice: function () {
                return 102.98;
            },
            storefrontCvlPrice: function () {
                return 0.2;
            },
            storefrontCvlQuoteUsd: function () {
                return 500.48635;
            },
        };
    },
};
var web3Provider = new web3_providers_http_1.default("http://localhost:8045");
var web3 = new web3_1.default(web3Provider);
var civilContext = CivilContext_1.buildCivilContext({ web3: web3, featureFlags: ["uniswap"], config: { DEFAULT_ETHEREUM_NETWORK: 4 } });
var foundationAddress = "hello!";
react_1.storiesOf("Storefront / Buy Tab", module)
    .addDecorator(apollo_storybook_react_1.default({
    typeDefs: typeDefs,
    mocks: mocks,
}))
    .addDecorator(storybook_react_router_1.default())
    .add("Buy Tab", function () {
    return (React.createElement(exports.Container, null,
        React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContext },
            React.createElement(TokensTabBuy_1.TokensTabBuy, { foundationAddress: foundationAddress, network: "4" }))));
})
    .add("Buy from Uniswap", function () {
    return (React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContext },
        React.createElement(exports.Container, null,
            React.createElement(UniswapBuy_1.UniswapBuy, { usdToSpend: 100, ethToSpend: 0.746, ethExchangeRate: 0.00746, onBuyComplete: function () { return alert("buy complete"); } }))));
})
    .add("Buy from Airswap", function () {
    return (React.createElement(exports.Container, null,
        React.createElement(AirswapBuyCVL_1.AirswapBuyCVL, { network: "4", buyFromAddress: "0x0...", buyCVLBtnText: "Buy from the Civil Foundation" })));
})
    .add("Buy Complete", function () {
    return (React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContext },
        React.createElement(exports.Container, null,
            React.createElement(TokensTabBuyComplete_1.TokensTabBuyComplete, null))));
});
var templateObject_1;
//# sourceMappingURL=TokensTabBuy.stories.js.map