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 { XMarkIcon } from "@navikt/aksel-icons";
import { Button } from "../../../button/index.js";
import { cl } from "../../../utils/helpers/index.js";
import { useI18n } from "../../../utils/i18n/i18n.hooks.js";
/**
 * @see 🏷️ {@link BaseAlertCloseButtonProps}
 * @example
 * ```jsx
 *  <BaseAlert>
 *    <BaseAlert.Header>
 *      <BaseAlert.Title>Info title</BaseAlert.Title>
 *      <BaseAlert.CloseButton onClick={...} />
 *    </BaseAlert.Header>
 *  </BaseAlert>
 * ```
 */
const BaseAlertCloseButton = forwardRef((_a, forwardedRef) => {
    var { className } = _a, restProps = __rest(_a, ["className"]);
    const translate = useI18n("global");
    return (React.createElement(Button, Object.assign({ ref: forwardedRef, type: "button" }, restProps, { "data-color": "neutral", variant: "tertiary-neutral", className: cl(className, "aksel-base-alert__close-button"), size: "small", title: translate("close"), icon: React.createElement(XMarkIcon, { "aria-hidden": true }) })));
});
export { BaseAlertCloseButton };
//# sourceMappingURL=BaseAlertCloseButton.js.map