"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 utils_1 = require("@joincivil/utils");
exports.Story = function (props) {
    return (React.createElement(React.Fragment, null,
        React.createElement(StoryFeedStyledComponents_1.StoryLink, { onClick: props.handleOpenStory },
            React.createElement(StoryFeedStyledComponents_1.StoryLinkLeft, null,
                React.createElement(StoryFeedStyledComponents_1.StoryTitle, null, props.openGraphData.title),
                props.openGraphData.article && props.openGraphData.article.published_time && (React.createElement(StoryFeedStyledComponents_1.TimeStamp, null, utils_1.getTimeSince(props.openGraphData.article.published_time)))),
            props.openGraphData.images && (React.createElement(StoryFeedStyledComponents_1.StoryImgSquare, null,
                React.createElement("img", { src: props.openGraphData.images[0].url }))))));
};
//# sourceMappingURL=Story.js.map