import { c } from "react-compiler-runtime";
import React from "react";
import { Link, Typography, makeStyles, useTheme } from "@material-ui/core";
import { Link as Link$1 } from "react-router-dom";
//#region src/UI/inputs/link/FluentLink.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		textDecoration: "none",
		"& > * + *": { marginLeft: theme.spacing(2) }
	},
	link: {
		textDecoration: "none",
		fontWeight: 700
	}
}));
const FluentLink = (props) => {
	const $ = c(15);
	let activeClassName;
	let children;
	let linkColor;
	let otherProps;
	let to;
	if ($[0] !== props) {
		const { icon, alt, label, children: t0, activeClassName: t1, to: t2, linkColor: t3, ...t4 } = props;
		children = t0;
		activeClassName = t1;
		to = t2;
		linkColor = t3;
		otherProps = t4;
		$[0] = props;
		$[1] = activeClassName;
		$[2] = children;
		$[3] = linkColor;
		$[4] = otherProps;
		$[5] = to;
	} else {
		activeClassName = $[1];
		children = $[2];
		linkColor = $[3];
		otherProps = $[4];
		to = $[5];
	}
	const theme = useTheme();
	const classes = useStyles();
	let t0;
	if ($[6] !== activeClassName || $[7] !== children || $[8] !== classes.link || $[9] !== classes.root || $[10] !== linkColor || $[11] !== otherProps || $[12] !== theme || $[13] !== to) {
		t0 = to && to.substring(0, 4) !== "http" ? /* @__PURE__ */ React.createElement(Link$1, {
			to,
			activeClassName,
			className: classes.link,
			style: { color: linkColor === "primary" ? theme.palette.primary.main : theme.palette.secondary.main }
		}, children) : /* @__PURE__ */ React.createElement(Typography, {
			component: "div",
			className: classes.root
		}, /* @__PURE__ */ React.createElement(Link, {
			...otherProps,
			href: to,
			color: linkColor,
			variant: "body1",
			style: { textDecoration: "none" }
		}, children));
		$[6] = activeClassName;
		$[7] = children;
		$[8] = classes.link;
		$[9] = classes.root;
		$[10] = linkColor;
		$[11] = otherProps;
		$[12] = theme;
		$[13] = to;
		$[14] = t0;
	} else t0 = $[14];
	return t0;
};
//#endregion
export { FluentLink };

//# sourceMappingURL=FluentLink.mjs.map