"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 TokensTabSell_1 = require("./TokensTabSell");
var CivilContext_1 = require("../../context/CivilContext");
var TokensTabSellUnlock_1 = require("./TokensTabSellUnlock");
var UniswapSell_1 = require("./UniswapSell");
var Notice_1 = require("../../Notice");
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 137.23;
            },
            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 civilContextNoUniswap = CivilContext_1.buildCivilContext({ web3: web3, featureFlags: [], config: { DEFAULT_ETHEREUM_NETWORK: 4 } });
react_1.storiesOf("Storefront / Sell Tab", module)
    .addDecorator(apollo_storybook_react_1.default({
    typeDefs: typeDefs,
    mocks: mocks,
}))
    .addDecorator(storybook_react_router_1.default())
    .add("Sell Tab", function () {
    return (React.createElement(exports.Container, null,
        React.createElement(Notice_1.Notice, { type: Notice_1.NoticeTypes.INFO }, "notes for storybooks: if you are actually trying to buy you might have troubles. make sure the storefrontEthPrice graphql mock gets updated to the current price."),
        React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContext },
            React.createElement(TokensTabSell_1.TokensTabSell, { network: "4" }))));
})
    .add("Coming Soon", function () {
    return (React.createElement(exports.Container, null,
        React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContextNoUniswap },
            React.createElement(TokensTabSell_1.TokensTabSell, { network: "4" }))));
})
    .add("Need to Unlock", function () {
    return (React.createElement(exports.Container, null,
        React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContextNoUniswap },
            React.createElement(TokensTabSellUnlock_1.TokensTabSellUnlock, null))));
})
    .add("Uniswap", function () {
    return (React.createElement(exports.Container, null,
        React.createElement("div", null,
            React.createElement("div", null, "ethExchangeRate: 0.5"),
            React.createElement("div", null, "cvlToSell: 100"),
            React.createElement("div", null, "etherToReceive: 50")),
        React.createElement(CivilContext_1.CivilContext.Provider, { value: civilContextNoUniswap },
            React.createElement(UniswapSell_1.UniswapSell, { ethExchangeRate: 0.5, cvlToSell: 100, onSellComplete: function () { return ({}); } }))));
});
var templateObject_1;
//# sourceMappingURL=TokensTabSell.stories.js.map