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 { cl } from "../utils/helpers/index.js";
import { typoClassNames } from "./util.js";
/**
 * Part of a set of components for displaying text with consistent typography.
 *
 * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/typography)
 * @see 🏷️ {@link LabelProps}
 * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support
 *
 * @example
 * ```jsx
 * <Label>
 *   Oppgi årsaken til at du har ventet mer enn 6 måneder med å søke om refusjon
 * </Label>
 * ```
 */
export const Label = forwardRef((_a, ref) => {
    var { className, size = "medium", as: Component = "label", spacing, visuallyHidden, textColor } = _a, rest = __rest(_a, ["className", "size", "as", "spacing", "visuallyHidden", "textColor"]);
    return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(className, "aksel-label", typoClassNames({
            spacing,
            visuallyHidden,
            textColor,
        }), {
            "aksel-label--small": size === "small",
        }) })));
});
export default Label;
//# sourceMappingURL=Label.js.map