import { __assign, __rest } from "tslib";
/* eslint-disable jsx-a11y/anchor-has-content */
/* eslint-disable jsx-a11y/control-has-associated-label */
// @ts-nocheck
import './VacancyCard.css';
import React from 'react';
import { NavLink } from 'react-router-dom';
import { cn } from '../../utils/bem';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
import { Typography } from '../Typography/Typography';
export var cnVacancyCard = cn('VacancyCard');
export var VacancyCard = forwardRefWithAs(function (props, ref) {
    var _a = usePropsHandler(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 = __rest(_a, ["path", "size", "title", "titleSize", "locationTags", "view", "text", "bubleText", "isHot", "contentType"]);
    return (React.createElement("div", __assign({ className: cnVacancyCard({ view: view, size: size, link: !!path }), ref: ref }, otherProps),
        path && React.createElement(NavLink, { to: path, className: cnVacancyCard('Link') }),
        React.createElement("div", { className: cnVacancyCard('Title') },
            React.createElement(Typography.Title, { size: titleSize }, title)),
        (locationTags === null || locationTags === void 0 ? void 0 : locationTags.length) > 0 && (React.createElement("ul", { className: cnVacancyCard('Cities') }, locationTags.map(function (location) { return (React.createElement("li", { key: location.id }, location.title)); }))),
        text && React.createElement(Typography.Text, { className: cnVacancyCard('Text') }, text)));
});
