import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { forwardRef } from "react";
import { cardHeader, cardHeaderContent } from "./styles.js";
/**
 * @see {@link https://react-md.dev/components/card | Card Demos}
 * @since 6.0.0 Removed the `align` prop.
 * @since 6.0.0 Renamed the `beforeChildren` and `afterChildren` props to
 * `beforeAddon` and `afterAddon`.
 * @since 6.0.0 Removed the `contentClassName` prop in favor of the
 * `contentProps`.
 * @since 6.0.0 No longer uses the `TextIconSpacing` component and instead
 * relies on the CSS `gap` for spacing.
 * @since 6.0.0 Renders as a `<div>` instead of a `<header>`
 */ export const CardHeader = /*#__PURE__*/ forwardRef(function CardHeader(props, ref) {
    const { className, children, beforeAddon, afterAddon, contentProps, ...remaining } = props;
    return /*#__PURE__*/ _jsxs("div", {
        ...remaining,
        ref: ref,
        className: cardHeader({
            className,
            addonBefore: !!beforeAddon,
            addonAfter: !!afterAddon
        }),
        children: [
            beforeAddon,
            /*#__PURE__*/ _jsx("div", {
                ...contentProps,
                className: cardHeaderContent({
                    className: contentProps?.className
                }),
                children: children
            }),
            afterAddon
        ]
    });
});

//# sourceMappingURL=CardHeader.js.map