"use strict";
exports.__esModule = true;
exports.Banner = exports.bannerPropViewDefault = exports.bannerPropView = void 0;
var tslib_1 = require("tslib");
// @ts-nocheck
/* eslint-disable jsx-a11y/anchor-has-content */
require("./Banner.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var PropsWithAsAttributes_1 = require("../../utils/types/PropsWithAsAttributes");
var bem_1 = require("../../utils/bem");
var Typography_1 = require("../Typography");
var Button_1 = require("../Button/Button");
var Picture_1 = require("../Picture/Picture");
var IconArrowRight_1 = require("../../icons/IconArrowRight/IconArrowRight");
exports.bannerPropView = ['glassdoor', 'vacancy', 'section'];
exports.bannerPropViewDefault = exports.bannerPropView[0];
var cnBanner = (0, bem_1.cn)('Banner');
exports.Banner = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props, ref) {
    var _a = props.view, view = _a === void 0 ? exports.bannerPropViewDefault : _a, title = props.title, titleSize = props.titleSize, labelButton = props.labelButton, text = props.text, picture = props.picture, _b = props.buttonIcon, buttonIcon = _b === void 0 ? IconArrowRight_1.IconArrowRight : _b, _c = props.buttonIconSize, buttonIconSize = _c === void 0 ? 'm' : _c, buttonAttrs = props.buttonAttrs, onClick = props.onClick, bgColor = props.bgColor, inverted = props.inverted, className = props.className, labelButtonSecondary = props.labelButtonSecondary, onClickSecondary = props.onClickSecondary, buttonAttrsSecondary = props.buttonAttrsSecondary, leftColor = props.leftColor, rightColor = props.rightColor, subtitle = props.subtitle, targetBlank = props.targetBlank, link = props.link, otherProps = (0, tslib_1.__rest)(props, ["view", "title", "titleSize", "labelButton", "text", "picture", "buttonIcon", "buttonIconSize", "buttonAttrs", "onClick", "bgColor", "inverted", "className", "labelButtonSecondary", "onClickSecondary", "buttonAttrsSecondary", "leftColor", "rightColor", "subtitle", "targetBlank", "link"]);
    return (react_1["default"].createElement("div", (0, tslib_1.__assign)({ className: cnBanner({ view: view, inverted: inverted }, [className]), style: { backgroundColor: bgColor } }, otherProps),
        view === 'case' ? (targetBlank ? (react_1["default"].createElement("a", { href: link, target: "_blank", rel: "noreferrer noopener", className: cnBanner('Link') })) : null) : null,
        react_1["default"].createElement("div", { className: cnBanner('Inner') },
            react_1["default"].createElement(Typography_1.Typography.Text, { className: cnBanner('SubTitle'), size: "xs", weight: "bold", transform: "uppercase" }, subtitle),
            react_1["default"].createElement(Typography_1.Typography.Title, { className: cnBanner('Title'), size: titleSize }, title),
            text && (react_1["default"].createElement(Typography_1.Typography.Text, { className: cnBanner('Text') }, text)),
            labelButton && (react_1["default"].createElement("div", { className: cnBanner('Button') },
                react_1["default"].createElement(Button_1.Button, (0, tslib_1.__assign)({ view: "link-secondary", iconRight: buttonIcon, iconSize: buttonIconSize, label: labelButton, onClick: onClick, inverted: inverted }, buttonAttrs)))),
            labelButtonSecondary && (react_1["default"].createElement("div", { className: cnBanner('SecondaryButton') },
                react_1["default"].createElement(Button_1.Button, (0, tslib_1.__assign)({ view: "link-secondary", iconRight: buttonIcon, iconSize: buttonIconSize, label: labelButtonSecondary, onClick: onClickSecondary, inverted: inverted }, buttonAttrsSecondary))))),
        picture && (react_1["default"].createElement("div", { className: cnBanner('Picture') },
            react_1["default"].createElement(Picture_1.Picture, (0, tslib_1.__assign)({}, picture))))));
});
