import { cx as e } from "../../../theme/tools.js";
import { ButtonLoadingSpinnerSvg as t } from "../../../icons/ButtonLoadingSpinnerSvg.js";
import { activeButton as n, button as r, content as i, iconLeft as a, iconRight as o, loadingIndicator as s, spinnerIcon as c } from "./button.css.js";
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
import f from "@plumile/router/routing/Link.js";
//#region src/atomic/atoms/button/LinkButton.tsx
var p = (p) => {
	let { children: m, className: h, isDisabled: g, isLoading: _ = !1, leftIcon: v, loadingLabel: y, ref: b, rightIcon: x, size: S, variant: C, width: w, ...T } = p, E = e(r({
		variant: C,
		size: S,
		width: w
	}), h), D = !!_ || !!g, O = C === "icon", k;
	if (_) k = /* @__PURE__ */ d("span", {
		className: s,
		children: [/* @__PURE__ */ u(t, {
			className: c,
			width: 20,
			height: 20
		}), y]
	});
	else if (O) k = /* @__PURE__ */ u("span", { children: v ?? x ?? m ?? null });
	else {
		let e = [];
		v != null && e.push(/* @__PURE__ */ u("span", {
			className: a,
			children: v
		}, "left-icon")), e.push(/* @__PURE__ */ u("span", {
			className: i,
			children: m
		}, "content")), x != null && e.push(/* @__PURE__ */ u("span", {
			className: o,
			children: x
		}, "right-icon")), k = /* @__PURE__ */ u(l, { children: e });
	}
	let A;
	return D && (A = !0), /* @__PURE__ */ u(f, {
		...T,
		ref: b,
		className: E,
		activeClassName: n({ variant: C }),
		isDisabled: D,
		"aria-disabled": A,
		children: k
	});
};
//#endregion
export { p as LinkButton };

//# sourceMappingURL=LinkButton.js.map