import React, { useEffect } from 'react';
import Text from '../../../Text';
import Box from '../../../Box';
import { st, classes } from './Subheader.st.css.js';
import { isString } from '../../../utils/StringUtils';
import deprecationLog from '../../../utils/deprecationLog';
/**
 * @deprecated Card.Subheader is deprecated and will be removed in the next major version. Please use SectionHeader instead.
 */
export const Subheader = ({ dataHook, title, suffix, skin = 'standard', }) => {
    useEffect(() => {
        deprecationLog('Card.Subheader is deprecated and will be removed in the next major version. Please use SectionHeader instead.');
    }, []);
    return (React.createElement("div", { "data-hook": dataHook, className: st(classes.root, {
            skin,
        }) },
        React.createElement(Box, { verticalAlign: "middle", flexGrow: 1, overflow: "hidden" }, isString(title) ? (React.createElement(Text, { ellipsis: true, weight: "normal", size: "medium", dataHook: "title" }, title)) : (React.createElement("div", { "data-hook": "title-node" }, title))),
        suffix && (React.createElement("div", { className: classes.suffix, "data-hook": "suffix-node" }, suffix))));
};
Subheader.displayName = 'Card.Subheader';
export default Subheader;
//# sourceMappingURL=Subheader.js.map