import { __assign } from "tslib";
// @ts-nocheck
import './ContentAnchorCard.css';
import React from 'react';
import { IconChevronArrowDown } from '../../icons/IconChevronArrowDown/IconChevronArrowDown';
import { cn } from '../../utils/bem';
import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
import { Button } from '../Button/Button';
import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
import { Picture } from '../Picture/Picture';
import { Typography } from '../Typography/Typography';
export var cnContentAnchorCard = cn('ContentAnchorCard');
export var ContentAnchorCard = forwardRefWithAs(function (props, ref) {
    var _a = usePropsHandler(cnContentAnchorCard(), props), icon = _a.icon, title = _a.title, lineColor = _a.lineColor, _b = _a.view, view = _b === void 0 ? 'default' : _b, path = _a.path, onClick = _a.onClick;
    var Component = path ? 'a' : 'button';
    var options = {};
    if (path) {
        options.to = path;
    }
    return (React.createElement(Component, __assign({ className: cnContentAnchorCard({ view: view }) }, options, { onClick: function () { return onClick(path); } }),
        lineColor && (React.createElement("div", { className: cnContentAnchorCard('Line'), style: { backgroundColor: lineColor } })),
        title && (React.createElement(Typography.Title, { size: "md", className: cnContentAnchorCard('Title') }, title)),
        icon && React.createElement(Picture, { desktop: icon, className: cnContentAnchorCard('Icon') }),
        React.createElement(Button, { as: "div", view: "ghost", iconRight: IconChevronArrowDown, iconSize: "xs" })));
});
