import { jsx as _jsx } from "react/jsx-runtime";
import { useUniqId } from '@gravity-ui/uikit';
import { CardBase, IconWrapper } from "../../components/index.js";
import { useTheme } from "../../gravity-blocks/context/theme/index.js";
import { IconPosition } from "../../models/constructor-items/sub-blocks.js";
import { block, getThemedValue } from "../../utils/index.js";
import Content from "../Content/Content.js";
import './BasicCard.css';
const b = block('basic-card');
const BasicCard = (props) => {
    const { title, text, icon, additionalInfo, links, list, buttons, iconPosition = IconPosition.Top, controlPosition = 'content', size = 's', gravityIcon, 
    /** @deprecated This property will be removed in future versions */
    hoverBackgroundColor, ...cardParams } = props;
    const titleId = useUniqId();
    const descriptionId = useUniqId();
    const areControlsInFooter = controlPosition === 'footer';
    const theme = useTheme();
    const themedIcon = getThemedValue(icon, theme);
    const themedGravityIcon = getThemedValue(gravityIcon, theme);
    return (_jsx(CardBase, { className: b(), contentClassName: b('content'), ...cardParams, extraProps: {
            'aria-describedby': descriptionId,
            'aria-labelledby': titleId,
            ...(hoverBackgroundColor && {
                style: {
                    '--hover-background-color': hoverBackgroundColor,
                },
            }),
        }, children: _jsx(CardBase.Content, { children: _jsx(IconWrapper, { icon: themedIcon ? { value: themedIcon, position: iconPosition } : undefined, gravityIcon: themedGravityIcon
                    ? { value: themedGravityIcon, position: iconPosition }
                    : undefined, className: b('wrapper'), size: size, children: _jsx(Content, { title: title, titleId: titleId, text: text, textId: descriptionId, additionalInfo: additionalInfo, links: links, list: list, buttons: buttons, size: size, colSizes: { all: 12, md: 12 }, controlPosition: areControlsInFooter ? 'bottom' : 'default' }) }) }) }));
};
export default BasicCard;
//# sourceMappingURL=BasicCard.js.map
