// @ts-nocheck
import './NoteText.css';
import React from 'react';
import { IconFacebook } from '../../icons/IconFacebook/IconFacebook';
import { IconOpenInNew } from '../../icons/IconOpenInNew/IconOpenInNew';
import { IconTwitter } from '../../icons/IconTwitter/IconTwitter';
import { cn } from '../../utils/bem';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { Article } from '../Article/Article';
import { Button } from '../Button/Button';
import { SiteBlock } from '../SiteBlock/SiteBlock';
import { Typography } from '../Typography';
var cnNoteText = cn('NoteText');
export var NoteText = 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.createElement("div", { className: cnNoteText() },
        title && (React.createElement(Typography.Text, { size: "xs", weight: "bold", transform: "uppercase", as: titleTag }, title)),
        React.createElement(Article, { content: content }),
        (strings === null || strings === void 0 ? void 0 : strings.length) > 0 && (React.createElement(SiteBlock, { useMargin: true, topGap: "s" },
            React.createElement("article", { className: "Article" },
                React.createElement("ul", null, strings.map(function (item) { return (React.createElement("li", { key: item }, item)); }))))),
        (link || twitter || facebook) && (React.createElement("div", { className: cnNoteText('Bottom') },
            link && (React.createElement("div", { className: cnNoteText('Link') },
                React.createElement(Button, { as: "a", target: link.targetBlank ? '_blank' : null, label: link.title, href: link.link, view: "link-secondary", iconRight: link.targetBlank ? IconOpenInNew : null, iconSize: "xs" }))),
            (twitter || facebook) && (React.createElement("div", { className: cnNoteText('Socials') },
                twitter && (React.createElement(Button, { href: twitter, target: "_blank", view: "ghost", as: "a", iconRight: IconTwitter, size: "xs" })),
                facebook && (React.createElement(Button, { view: "ghost", as: "a", href: facebook, target: "_blank", iconRight: IconFacebook, size: "xs" }))))))));
});
