"use strict";
exports.__esModule = true;
exports.renderReference = void 0;
var tslib_1 = require("tslib");
/* eslint-disable react/react-in-jsx-scope */
// @ts-nocheck
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var react_router_dom_1 = require("react-router-dom");
var BlogCard_1 = require("../components/BlogCard/BlogCard");
var CaseCard_1 = require("../components/CaseCard/CaseCard");
var DefaultCard_1 = require("../components/DefaultCard/DefaultCard");
var LinkCard_1 = require("../components/LinkCard/LinkCard");
var VideoCard_1 = require("../components/VideoCard/VideoCard");
var renderReference = function (props, aliases) {
    var contentType = props.contentType, item = props.item;
    switch (contentType) {
        // Blog post
        case 0:
            return (react_1["default"].createElement(BlogCard_1.BlogCard, (0, tslib_1.__assign)({}, item, { path: (0, react_router_dom_1.generatePath)(aliases.BLOG_SINGLE, {
                    slug: item.slug
                }) }, props)));
        // CaseCard
        case 1:
            return (react_1["default"].createElement(CaseCard_1.CaseCard, (0, tslib_1.__assign)({}, item, props, { routePath: (0, react_router_dom_1.generatePath)(aliases.CASE_PAGE, {
                    slug: item.slug
                }) })));
        // Landing
        case 2:
            return react_1["default"].createElement(DefaultCard_1.DefaultCard, (0, tslib_1.__assign)({ view: "filled" }, item, { redirectTo: item.link }));
        // VideoCard
        case 3:
            return react_1["default"].createElement(VideoCard_1.VideoCard, (0, tslib_1.__assign)({ view: "filled" }, item));
        // Offering
        case 4:
            if (item.industrySlug) {
                return (react_1["default"].createElement(DefaultCard_1.DefaultCard, (0, tslib_1.__assign)({ view: "filled" }, item, { path: (0, react_router_dom_1.generatePath)(aliases.INDUSTRIES_PAGE_INNER, {
                        slug: item.industrySlug,
                        // eslint-disable-next-line @typescript-eslint/camelcase
                        inner_page: item.slug
                    }), linkTitle: props.linkTitle })));
            }
            break;
        // LinkCard
        case 6:
            return react_1["default"].createElement(LinkCard_1.LinkCard, (0, tslib_1.__assign)({}, item, props));
        default:
            break;
    }
};
exports.renderReference = renderReference;
