'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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
require("../../stylesheets/attachments/title.scss");
const React = __importStar(require("react"));
const emoji_1 = __importDefault(require("../../utils/emoji"));
const TitleLink = ({ title, link }) => (React.createElement("a", { className: "title--link", target: "_blank", href: link, dangerouslySetInnerHTML: { __html: emoji_1.default.toImage(title) } }));
const Title = ({ title, link, caret }) => link ? (React.createElement("div", { className: "title" },
    React.createElement(TitleLink, { title: title, link: link }),
    " ",
    caret)) : (React.createElement("div", { className: "title" },
    React.createElement("span", { dangerouslySetInnerHTML: { __html: emoji_1.default.toImage(title) } }),
    " ",
    caret));
exports.default = Title;
//# sourceMappingURL=Title.js.map