"use strict";
exports.__esModule = true;
exports.NoteText = void 0;
var tslib_1 = require("tslib");
// @ts-nocheck
require("./NoteText.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var IconFacebook_1 = require("../../icons/IconFacebook/IconFacebook");
var IconOpenInNew_1 = require("../../icons/IconOpenInNew/IconOpenInNew");
var IconTwitter_1 = require("../../icons/IconTwitter/IconTwitter");
var bem_1 = require("../../utils/bem");
var PropsWithAsAttributes_1 = require("../../utils/types/PropsWithAsAttributes");
var Article_1 = require("../Article/Article");
var Button_1 = require("../Button/Button");
var SiteBlock_1 = require("../SiteBlock/SiteBlock");
var Typography_1 = require("../Typography");
var cnNoteText = (0, bem_1.cn)('NoteText');
exports.NoteText = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props, ref) {
    var title = props.title, titleTag = props.titleTag, content = props.content, link = props.link, twitter = props.twitter, facebook = props.facebook, strings = props.strings;
    return (react_1["default"].createElement("div", { className: cnNoteText() },
        title && (react_1["default"].createElement(Typography_1.Typography.Text, { size: "xs", weight: "bold", transform: "uppercase", as: titleTag }, title)),
        react_1["default"].createElement(Article_1.Article, { content: content }),
        (strings === null || strings === void 0 ? void 0 : strings.length) > 0 && (react_1["default"].createElement(SiteBlock_1.SiteBlock, { useMargin: true, topGap: "s" },
            react_1["default"].createElement("article", { className: "Article" },
                react_1["default"].createElement("ul", null, strings.map(function (item) { return (react_1["default"].createElement("li", { key: item }, item)); }))))),
        (link || twitter || facebook) && (react_1["default"].createElement("div", { className: cnNoteText('Bottom') },
            link && (react_1["default"].createElement("div", { className: cnNoteText('Link') },
                react_1["default"].createElement(Button_1.Button, { as: "a", target: link.targetBlank ? '_blank' : null, label: link.title, href: link.link, view: "link-secondary", iconRight: link.targetBlank ? IconOpenInNew_1.IconOpenInNew : null, iconSize: "xs" }))),
            (twitter || facebook) && (react_1["default"].createElement("div", { className: cnNoteText('Socials') },
                twitter && (react_1["default"].createElement(Button_1.Button, { href: twitter, target: "_blank", view: "ghost", as: "a", iconRight: IconTwitter_1.IconTwitter, size: "xs" })),
                facebook && (react_1["default"].createElement(Button_1.Button, { view: "ghost", as: "a", href: facebook, target: "_blank", iconRight: IconFacebook_1.IconFacebook, size: "xs" }))))))));
});
