var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import React, { forwardRef } from "react";
import { BodyLong } from "../../../typography/index.js";
import { cl } from "../../../utils/helpers/index.js";
import { useBaseAlert } from "../../base-alert/root/BaseAlertRoot.context.js";
/**
 * A component for displaying informational messages.
 * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard)
 * @see 🏷️ {@link InfoCardMessageProps}
 * @example
 * ```jsx
 * <InfoCard data-color="info">
 *   <InfoCard.Message icon={<InformationSquareIcon aria-hidden />}>
 *     Message contents
 *   </InfoCard.Message>
 * </InfoCard>
 * ```
 */
const InfoCardMessage = forwardRef((_a, forwardedRef) => {
    var { children, className, icon } = _a, restProps = __rest(_a, ["children", "className", "icon"]);
    const context = useBaseAlert();
    return (React.createElement("div", Object.assign({ ref: forwardedRef, className: cl(className, "aksel-base-alert__message") }, restProps),
        React.createElement("div", { className: "aksel-base-alert__icon" }, icon),
        React.createElement(BodyLong, { size: context.size, as: "div", textColor: "default" }, children)));
});
export { InfoCardMessage };
//# sourceMappingURL=InfoCardMessage.js.map