"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 __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
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 styled_components_1 = __importDefault(require("styled-components"));
var storybook_react_router_1 = __importDefault(require("storybook-react-router"));
var ListingSummary_1 = require("./ListingSummary");
var ListingSummaryRejected_1 = require("./ListingSummaryRejected");
var ListingSummaryList_1 = require("./ListingSummaryList");
var StyledDiv = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: flex;\n  width: 600px;\n"], ["\n  display: flex;\n  width: 600px;\n"])));
var totalVotes = "100000";
var votesFor = "73000";
var votesAgainst = "27000";
var percentFor = "73";
var percentAgainst = "27";
var didChallengeSucceed = false;
var newsroomData = [
    {
        listingAddress: "0x0a",
        name: "Block Club Chicago",
        charter: {
            tagline: "Block Club Chicago is a nonprofit, neighborhood news organization dedicated to delivering reliable, nonpartisan and essential coverage of Chicago's diverse neighborhoods.",
        },
    },
    {
        listingAddress: "0x0b",
        name: "Cannabis Wire",
        charter: {
            tagline: "Cannabis Wire is an independent publication covering the multi-billion dollar cannabis industry, focusing on investigation into the complexities that come with legaliation.",
        },
    },
    {
        listingAddress: "0x0c",
        name: "Documented",
        charter: {
            tagline: "Documented covers New York City’s immigrants and the policies that affect their lives. We are an independent and nonpartisan publication.",
        },
    },
    {
        listingAddress: "0x0d",
        name: "Block Club Chicago",
        charter: {
            tagline: "Block Club Chicago is a nonprofit, neighborhood news organization dedicated to delivering reliable, nonpartisan and essential coverage of Chicago's diverse neighborhoods.",
        },
    },
    {
        listingAddress: "0x0e",
        name: "Cannabis Wire",
        charter: {
            tagline: "Cannabis Wire is an independent publication covering the multi-billion dollar cannabis industry, focusing on investigation into the complexities that come with legaliation.",
        },
    },
    {
        listingAddress: "0x0f",
        name: "Documented",
        charter: {
            tagline: "Documented covers New York City’s immigrants and the policies that affect their lives. We are an independent and nonpartisan publication.",
        },
    },
];
var newsrooms = newsroomData.map(function (newsroom) {
    var listingDetailURL = "/listing/" + newsroom.listingAddress;
    return __assign(__assign({}, newsroom), { listingDetailURL: listingDetailURL });
});
var Container = function (_a) {
    var children = _a.children;
    return (React.createElement(StyledDiv, null,
        React.createElement("div", null, children)));
};
react_1.storiesOf("Registry / Listing / Listing Summary", module)
    .addDecorator(storybook_react_router_1.default())
    .add("Card", function () {
    var newsroom = newsrooms[0];
    return (React.createElement(Container, null,
        React.createElement(ListingSummary_1.ListingSummaryComponent, __assign({}, newsroom))));
})
    .add("Card Rejected", function () {
    var newsroom = newsrooms[0];
    return (React.createElement(Container, null, process.env.NODE_ENV !== "test" && (React.createElement(ListingSummaryRejected_1.ListingSummaryRejectedComponent, __assign({}, newsroom, { totalVotes: totalVotes, votesFor: votesAgainst, votesAgainst: votesFor, percentFor: percentAgainst, percentAgainst: percentFor, didChallengeSucceed: !didChallengeSucceed })))));
})
    .add("Card Grid", function () {
    return (React.createElement(Container, null,
        React.createElement(ListingSummaryList_1.ListingSummaryList, { listings: newsrooms })));
});
var templateObject_1;
//# sourceMappingURL=ListingSummary.stories.js.map