import { jsxs as h, jsx as n } from "react/jsx-runtime";
import { classNames as N } from "./index-classNames.js";
import { Icon as i } from "./index-Icon.js";
import { IconNames as k } from "./index-IconNames.js";
import { Text as b } from "./index-Text.js";
import "react";
import r from "./index-Link.module.scss.js";
const L = (s) => {
  const {
    href: m,
    newTabIcon: a,
    iconLeft: f,
    onClick: l,
    target: p = "_self",
    color: t = "--p500",
    iconName: c = k.newTab,
    disabled: o,
    ...d
  } = s, e = () => o ? "--n300" : t || "--p500";
  return h("a", {
    href: m,
    target: p,
    className: N(r.link, o ? r.disabled : ""),
    rel: "noreferrer",
    role: "link",
    onClick: (u) => {
      l && !o && l();
    },
    children: [f && n(i, {
      color: e(),
      className: r.icon,
      children: c
    }), n(b, {
      color: e(),
      ...d
    }), a && n(i, {
      color: e(),
      className: r.icon,
      children: c
    })]
  });
};
export {
  L as Link
};
