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 { PencilIcon } from "@navikt/aksel-icons";
import { Link } from "../../link/index.js";
import { CompositionWarning } from "../../utils/components/composition-warning/index.js";
import { cl } from "../../utils/helpers/index.js";
import { useI18n } from "../../utils/i18n/i18n.hooks.js";
export const FormSummaryEditLink = forwardRef((_a, ref) => {
    var { children, className, as = "a" } = _a, rest = __rest(_a, ["children", "className", "as"]);
    const translate = useI18n("FormSummary");
    return (React.createElement(CompositionWarning.Forbidden, { name: "FormSummary.Header", message: "<FormSummary.EditLink> should not be placed in <FormSummary.Header> anymore. See https://aksel.nav.no/komponenter/core/formsummary" },
        React.createElement(Link, Object.assign({ ref: ref, as: as }, rest, { className: cl("aksel-form-summary__edit", className) }),
            React.createElement(PencilIcon, { "aria-hidden": true, fontSize: "1.5rem" }),
            children || translate("editAnswer"))));
});
export default FormSummaryEditLink;
//# sourceMappingURL=FormSummaryEditLink.js.map