"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require('../../styles/components/text.css');const jsxRuntime = require("react/jsx-runtime");
const classNames = require("classnames");
const icons = require("@entur/icons");
const utils = require("../utils/utils.cjs");
;/* empty css            */
const Link = ({
  external = false,
  ariaLabelExternalIcon = "(ekstern lenke)",
  className,
  spacing,
  children,
  as,
  ...rest
}) => {
  const LinkElement = as || "a";
  return /* @__PURE__ */ jsxRuntime.jsxs(
    LinkElement,
    {
      className: classNames(
        "eds-text--link",
        utils.getSpacingClasses(spacing, "eds-text--link"),
        className
      ),
      ...rest,
      children: [
        children,
        external ? /* @__PURE__ */ jsxRuntime.jsx(
          icons.ExternalIcon,
          {
            className: "eds-text--link--ext-icon",
            "aria-label": ariaLabelExternalIcon
          }
        ) : null
      ]
    }
  );
};
exports.Link = Link;
//# sourceMappingURL=Link.cjs.map
