"use strict";
exports.__esModule = true;
exports.VacancyCard = exports.cnVacancyCard = void 0;
var tslib_1 = require("tslib");
/* eslint-disable jsx-a11y/anchor-has-content */
/* eslint-disable jsx-a11y/control-has-associated-label */
// @ts-nocheck
require("./VacancyCard.css");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var react_router_dom_1 = require("react-router-dom");
var bem_1 = require("../../utils/bem");
var PropsWithAsAttributes_1 = require("../../utils/types/PropsWithAsAttributes");
var usePropsHandler_1 = require("../EventInterceptor/usePropsHandler");
var Typography_1 = require("../Typography/Typography");
exports.cnVacancyCard = (0, bem_1.cn)('VacancyCard');
exports.VacancyCard = (0, PropsWithAsAttributes_1.forwardRefWithAs)(function (props, ref) {
    var _a = (0, usePropsHandler_1.usePropsHandler)((0, exports.cnVacancyCard)(), props), path = _a.path, size = _a.size, title = _a.title, _b = _a.titleSize, titleSize = _b === void 0 ? 'sm' : _b, locationTags = _a.locationTags, view = _a.view, text = _a.text, bubleText = _a.bubleText, isHot = _a.isHot, contentType = _a.contentType, otherProps = (0, tslib_1.__rest)(_a, ["path", "size", "title", "titleSize", "locationTags", "view", "text", "bubleText", "isHot", "contentType"]);
    return (react_1["default"].createElement("div", (0, tslib_1.__assign)({ className: (0, exports.cnVacancyCard)({ view: view, size: size, link: !!path }), ref: ref }, otherProps),
        path && react_1["default"].createElement(react_router_dom_1.NavLink, { to: path, className: (0, exports.cnVacancyCard)('Link') }),
        react_1["default"].createElement("div", { className: (0, exports.cnVacancyCard)('Title') },
            react_1["default"].createElement(Typography_1.Typography.Title, { size: titleSize }, title)),
        (locationTags === null || locationTags === void 0 ? void 0 : locationTags.length) > 0 && (react_1["default"].createElement("ul", { className: (0, exports.cnVacancyCard)('Cities') }, locationTags.map(function (location) { return (react_1["default"].createElement("li", { key: location.id }, location.title)); }))),
        text && react_1["default"].createElement(Typography_1.Typography.Text, { className: (0, exports.cnVacancyCard)('Text') }, text)));
});
