"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 web3_providers_http_1 = __importDefault(require("web3-providers-http"));
var apollo_storybook_react_1 = __importDefault(require("apollo-storybook-react"));
var styled_components_1 = __importDefault(require("styled-components"));
var __1 = require("../");
var context_1 = require("../../context");
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  justifiy-content: center;\n  width: 100%;\n  max-width: 720px;\n"], ["\n  align-items: center;\n  diplay: flex;\n  justifiy-content: center;\n  width: 100%;\n  max-width: 720px;\n"])));
var typeDefs = "\n  type User {\n    ethAddress: String\n  }\n\n  type Query {\n    currentUser: User\n  }\n\n  input UserSignatureInput {\n    message: String!\n    messageHash: String!\n    signature: String!\n    signer: String!\n    r: String!\n    s: String!\n    v: String!\n  }\n\n  type Mutation {\n    userSetEthAddress(\n      input: UserSignatureInput!\n    ): String\n  }\n\n  schema {\n    query: Query\n    mutation: Mutation\n  }\n";
var mocks = {
    Query: function () {
        return {
            currentUser: function () {
                return "ok";
            },
        };
    },
    Mutation: function () {
        return {
            userSetEthAddress: function (sig) {
                return "ok";
            },
        };
    },
};
var web3Provider = new web3_providers_http_1.default("http://localhost:8033");
var web3 = new web3_1.default(web3Provider);
var civilContext = context_1.buildCivilContext({ web3: web3, featureFlags: [], config: { DEFAULT_ETHEREUM_NETWORK: 4 } });
react_1.storiesOf("Common / Auth / ETH", module)
    .addDecorator(apollo_storybook_react_1.default({
    typeDefs: typeDefs,
    mocks: mocks,
}))
    .add("AccountEthAuth Component", function () {
    return (React.createElement(context_1.CivilContext.Provider, { value: civilContext },
        React.createElement(exports.Container, null,
            React.createElement(__1.AccountEthAuth, { civil: civilContext.civil, onAuthenticated: function () {
                    alert("authenticated successfully");
                } }))));
});
var templateObject_1;
//# sourceMappingURL=EthAuth.stories.js.map