"use strict";
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;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var StoryFeedStyledComponents_1 = require("./StoryFeedStyledComponents");
var StoryNewsroomStatus_1 = require("./StoryNewsroomStatus");
var Contributors_1 = require("../Contributors");
var elements_1 = require("@joincivil/elements");
var utils_1 = require("@joincivil/utils");
exports.StoryDetails = function (props) {
    var openGraphData = props.openGraphData;
    return (React.createElement(React.Fragment, null,
        openGraphData.images && (React.createElement(StoryFeedStyledComponents_1.StoryDetailsFullBleedHeader, null,
            React.createElement(StoryFeedStyledComponents_1.StoryImgWide, null,
                React.createElement("img", { src: openGraphData.images[0].url })))),
        React.createElement(StoryFeedStyledComponents_1.StoryDetailsContent, null,
            React.createElement(StoryFeedStyledComponents_1.StoryDetailsFlex, null,
                React.createElement(StoryFeedStyledComponents_1.StoryTitle, null, openGraphData.title),
                React.createElement(elements_1.ShareButton, { onClick: props.handleShare, textBottom: true })),
            React.createElement(StoryFeedStyledComponents_1.StoryDetailsFlexLeft, null,
                React.createElement(StoryNewsroomStatus_1.StoryNewsroomStatus, { newsroomName: props.newsroomName, activeChallenge: props.activeChallenge, handleOpenNewsroom: props.handleOpenNewsroom }),
                openGraphData.article && openGraphData.article.published_time && (React.createElement(StoryFeedStyledComponents_1.TimeStamp, null,
                    React.createElement(StoryFeedStyledComponents_1.TimeStampDot, null, "\u00B7"),
                    " ",
                    utils_1.getTimeSince(openGraphData.article.published_time)))),
            openGraphData.description && React.createElement(StoryFeedStyledComponents_1.StoryDescription, null, openGraphData.description),
            React.createElement(StoryFeedStyledComponents_1.StoryPostedAt, null,
                React.createElement(StoryFeedStyledComponents_1.TimeStamp, null,
                    "Posted on Civil ",
                    utils_1.getTimeSince(props.createdAt))),
            React.createElement(Contributors_1.Contributors, { sortedContributors: props.sortedContributors }),
            props.totalContributors !== 0 ? (React.createElement(Contributors_1.ContributorCount, { totalContributors: props.totalContributors, displayedContributors: props.displayedContributors })) : (React.createElement(React.Fragment, null))),
        React.createElement(StoryFeedStyledComponents_1.StoryDetailsFooter, null,
            React.createElement(StoryFeedStyledComponents_1.StoryDetailsFooterFlex, null,
                React.createElement(elements_1.PaymentButton, { onClick: props.handlePayments, border: true }),
                React.createElement(StoryFeedStyledComponents_1.BlueLinkBtn, { href: openGraphData.url, target: "_blank" }, "Read More")))));
};
//# sourceMappingURL=StoryDetails.js.map