import { isExternalLink as e, isRelativeUrl as t, isSafeHttpUrl as n } from "../helpers/isExternalLink.js";
import { MarkdownExternalLinkSvg as r } from "../../../../icons/markdown/MarkdownExternalLinkSvg.js";
import { baseLink as i, disabledLink as a, externalLink as o, icon as s } from "./MarkdownLink.css.js";
import { jsx as c, jsxs as l } from "react/jsx-runtime";
//#region src/atomic/molecules/markdown/components/MarkdownLink.tsx
var u = ({ children: u, href: d, title: f }) => {
	let p = d.trim();
	return !n(p) || t(p) ? /* @__PURE__ */ c("span", {
		"aria-disabled": "true",
		className: a,
		title: f,
		children: u
	}) : e(p) ? /* @__PURE__ */ l("a", {
		className: o,
		href: p,
		rel: "noopener noreferrer",
		target: "_blank",
		title: f,
		children: [/* @__PURE__ */ c("span", { children: u }), /* @__PURE__ */ c(r, { className: s })]
	}) : /* @__PURE__ */ c("a", {
		className: i,
		href: p,
		title: f,
		children: u
	});
};
//#endregion
export { u as MarkdownLink };

//# sourceMappingURL=MarkdownLink.js.map