"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const utils = require("@entur/utils");
const jsxRuntime = require("react/jsx-runtime");
const classNames = require("classnames");
const icons = require("@entur/icons");
const Blockquote = ({ className, ref, ...rest }) => {
  return /* @__PURE__ */ jsxRuntime.jsx(
    "blockquote",
    {
      className: classNames("eds-blockquote", className),
      ref,
      ...rest
    }
  );
};
const BlockquoteFooter = ({ className, ...rest }) => {
  return /* @__PURE__ */ jsxRuntime.jsx(
    "footer",
    {
      className: classNames("eds-blockquote__footer", className),
      ...rest
    }
  );
};
const defaultElement$h = "code";
const CodeText = ({
  className,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$h;
  return /* @__PURE__ */ jsxRuntime.jsx(Element, { className: classNames("eds-code-text", className), ...rest });
};
const defaultElement$g = "em";
const EmphasizedText = ({
  className,
  margin = "both",
  as,
  ...rest
}) => {
  const Element = as || defaultElement$g;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-emphasized-text",
        {
          [`eds-emphasized-text--margin-top`]: margin === "top",
          [`eds-emphasized-text--margin-bottom`]: margin === "bottom",
          [`eds-emphasized-text--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement$f = "h1";
const BaseHeading = ({
  className,
  level,
  margin,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$f;
  const baseClass = `eds-h${level}`;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        baseClass,
        {
          [`${baseClass}--margin-top`]: margin === "top",
          [`${baseClass}--margin-bottom`]: margin === "bottom",
          [`${baseClass}--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement$e = "h1";
const Heading1 = ({
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$e;
  return /* @__PURE__ */ jsxRuntime.jsx(BaseHeading, { as: Element, margin, ...rest, level: 1, children });
};
const defaultElement$d = "h2";
const Heading2 = ({
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$d;
  return /* @__PURE__ */ jsxRuntime.jsx(BaseHeading, { as: Element, margin, ...rest, level: 2, children });
};
const defaultElement$c = "h3";
const Heading3 = ({
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$c;
  return /* @__PURE__ */ jsxRuntime.jsx(BaseHeading, { as: Element, margin, ...rest, level: 3, children });
};
const defaultElement$b = "h4";
const Heading4 = ({
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$b;
  return /* @__PURE__ */ jsxRuntime.jsx(BaseHeading, { as: Element, margin, ...rest, level: 4, children });
};
const defaultElement$a = "h5";
const Heading5 = ({
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$a;
  return /* @__PURE__ */ jsxRuntime.jsx(BaseHeading, { as: Element, margin, ...rest, level: 5, children });
};
const defaultElement$9 = "h6";
const Heading6 = ({
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$9;
  return /* @__PURE__ */ jsxRuntime.jsx(BaseHeading, { as: Element, margin, ...rest, level: 6, children });
};
const defaultElement$8 = "label";
const Label = ({
  className,
  margin = "both",
  as,
  ...rest
}) => {
  const Element = as || defaultElement$8;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-label",
        {
          [`eds-label--margin-top`]: margin === "top",
          [`eds-label--margin-bottom`]: margin === "bottom",
          [`eds-label--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement$7 = "p";
const LeadParagraph = ({
  className,
  margin = "both",
  as,
  ...rest
}) => {
  const Element = as || defaultElement$7;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-lead-paragraph",
        {
          [`eds-lead-paragraph--margin-top`]: margin === "top",
          [`eds-lead-paragraph--margin-bottom`]: margin === "bottom",
          [`eds-lead-paragraph--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement$6 = "a";
const Link = ({
  external = false,
  ariaLabelExternalIcon = "(ekstern lenke)",
  className,
  margin = "both",
  children,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$6;
  return /* @__PURE__ */ jsxRuntime.jsxs(
    Element,
    {
      className: classNames(
        "eds-link",
        {
          [`eds-link--margin-top`]: margin === "top",
          [`eds-link--margin-bottom`]: margin === "bottom",
          [`eds-link--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest,
      children: [
        children,
        external ? /* @__PURE__ */ jsxRuntime.jsx(
          icons.ExternalIcon,
          {
            className: "eds-link--ext-icon",
            "aria-label": ariaLabelExternalIcon
          }
        ) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
      ]
    }
  );
};
const defaultElement$5 = "strong";
const StrongText = ({
  className,
  margin = "both",
  as,
  ...rest
}) => {
  const Element = as || defaultElement$5;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-strong-text",
        {
          [`eds-strong-text--margin-top`]: margin === "top",
          [`eds-strong-text--margin-bottom`]: margin === "bottom",
          [`eds-strong-text--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const ListItem = ({
  children,
  className,
  title,
  ...rest
}) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: classNames("eds-list-item", className), ...rest, children: [
  title && /* @__PURE__ */ jsxRuntime.jsx(StrongText, { className: "eds-list-item__title", children: title }),
  children
] });
const NumberedList = ({
  className,
  type = "1",
  ...rest
}) => /* @__PURE__ */ jsxRuntime.jsx(
  "ol",
  {
    className: classNames(
      "eds-numbered-list",
      { [`eds-numbered-list--type-${type}`]: type },
      className
    ),
    type,
    ...rest
  }
);
const defaultElement$4 = "p";
const Paragraph = ({
  margin = "bottom",
  className,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$4;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-paragraph",
        {
          "eds-paragraph--margin-bottom": margin === "bottom",
          "eds-paragraph--margin-none": margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement$3 = "pre";
const PreformattedText = ({
  className,
  as,
  ...rest
}) => {
  const Element = as || defaultElement$3;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames("eds-preformatted-text", className),
      ...rest
    }
  );
};
const defaultElement$2 = "span";
const SmallText = ({
  className,
  margin = "both",
  as,
  ...rest
}) => {
  const Element = as || defaultElement$2;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-small-text",
        {
          [`eds-small-text--margin-top`]: margin === "top",
          [`eds-small-text--margin-bottom`]: margin === "bottom",
          [`eds-small-text--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement$1 = "span";
const SubLabel = ({
  className,
  margin = "both",
  as,
  ...rest
}) => {
  const Element = as || defaultElement$1;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-sub-label",
        {
          [`eds-sub-label--margin-top`]: margin === "top",
          [`eds-sub-label--margin-bottom`]: margin === "bottom",
          [`eds-sub-label--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const defaultElement = "p";
const SubParagraph = ({
  className,
  margin,
  as,
  ...rest
}) => {
  const Element = as || defaultElement;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Element,
    {
      className: classNames(
        "eds-sub-paragraph",
        {
          [`eds-sub-paragraph--margin-top`]: margin === "top",
          [`eds-sub-paragraph--margin-bottom`]: margin === "bottom",
          [`eds-sub-paragraph--margin-none`]: margin === "none"
        },
        className
      ),
      ...rest
    }
  );
};
const UnorderedList = ({
  className,
  ...rest
}) => /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classNames("eds-unordered-list", className), ...rest });
utils.warnAboutMissingStyles("typography");
exports.Blockquote = Blockquote;
exports.BlockquoteFooter = BlockquoteFooter;
exports.CodeText = CodeText;
exports.EmphasizedText = EmphasizedText;
exports.Heading1 = Heading1;
exports.Heading2 = Heading2;
exports.Heading3 = Heading3;
exports.Heading4 = Heading4;
exports.Heading5 = Heading5;
exports.Heading6 = Heading6;
exports.Label = Label;
exports.LeadParagraph = LeadParagraph;
exports.Link = Link;
exports.ListItem = ListItem;
exports.NumberedList = NumberedList;
exports.Paragraph = Paragraph;
exports.PreformattedText = PreformattedText;
exports.SmallText = SmallText;
exports.StrongText = StrongText;
exports.SubLabel = SubLabel;
exports.SubParagraph = SubParagraph;
exports.UnorderedList = UnorderedList;
//# sourceMappingURL=typography.cjs.js.map
