import { t as e } from "../../utils-B7XIe3qq.js";
import { t } from "../../dist-BCCeHAQm.js";
import { t as n } from "../../dist-D0fg6pif.js";
import "react";
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
//#region src/react/primitives/button.tsx
var o = t("inline-flex min-w-0 shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-[8px] border border-transparent font-sans text-[13px] font-semibold leading-none transition-colors duration-150 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:ring-2 focus-visible:ring-primary/50", {
	variants: {
		variant: {
			default: "border-primary bg-primary text-primary-foreground hover:bg-primary-hover",
			primary: "border-primary bg-primary text-primary-foreground hover:bg-primary-hover",
			destructive: "border-destructive/30 bg-destructive/10 text-accent-rose hover:bg-destructive/15",
			outline: "border-border bg-transparent text-foreground hover:bg-accent",
			secondary: "border-border bg-card text-foreground hover:bg-accent",
			ghost: "text-muted-foreground hover:bg-accent hover:text-foreground",
			link: "text-primary underline-offset-4 hover:underline hover:text-primary/80",
			glass: "border-border-glass bg-glass text-foreground backdrop-blur-[20px] hover:bg-glass-hover",
			"glass-primary": "border-primary/30 bg-primary/20 text-primary backdrop-blur-[20px] hover:border-primary"
		},
		size: {
			default: "min-h-8 px-[14px] py-2",
			sm: "min-h-7 rounded-[4px] px-2.5 py-[5px] text-[12px]",
			lg: "min-h-10 px-6",
			icon: "size-8 p-0",
			"icon-sm": "size-7 rounded-[4px] p-0",
			"icon-lg": "size-10 p-0"
		}
	},
	defaultVariants: {
		variant: "default",
		size: "default"
	}
}), s = "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", c = {
	default: "bg-primary text-primary-foreground hover:bg-primary/90",
	destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
	outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
	secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
	ghost: "hover:bg-accent hover:text-accent-foreground",
	link: "text-primary underline-offset-4 hover:underline",
	glass: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
	"glass-primary": "bg-primary text-primary-foreground hover:bg-primary/90"
}, l = {
	default: "h-10 px-4 py-2",
	sm: "h-9 rounded-md px-3 text-sm",
	lg: "h-11 rounded-md px-8",
	icon: "h-10 w-10",
	"icon-sm": "h-9 w-9",
	"icon-lg": "h-11 w-11"
};
function u({ className: t, variant: u = "default", size: d = "default", asChild: f = !1, loading: p = !1, icon: m, iconPosition: h = "left", tone: g = "glass", disabled: _, children: v, ...y }) {
	let b = f ? n : "button", x = _ || p, S = u ?? "default", C = d ?? "default", w = g === "shadcn" ? e(s, c[S] ?? c.default, l[C] ?? l.default, t) : e(o({
		variant: u,
		size: d,
		className: t
	}));
	return /* @__PURE__ */ i(b, {
		"data-slot": "button",
		"data-variant": u,
		"data-size": d,
		"data-tone": g,
		disabled: x,
		"aria-disabled": x || void 0,
		"aria-busy": p || void 0,
		className: w,
		...y,
		children: p ? /* @__PURE__ */ a(r, { children: [
			/* @__PURE__ */ a("svg", {
				className: "size-4 animate-spin",
				viewBox: "0 0 24 24",
				fill: "none",
				"aria-hidden": "true",
				children: [/* @__PURE__ */ i("circle", {
					className: "opacity-25",
					cx: "12",
					cy: "12",
					r: "10",
					stroke: "currentColor",
					strokeWidth: "4"
				}), /* @__PURE__ */ i("path", {
					className: "opacity-75",
					fill: "currentColor",
					d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
				})]
			}),
			/* @__PURE__ */ i("span", {
				className: "sr-only",
				children: "Loading"
			}),
			v
		] }) : /* @__PURE__ */ a(r, { children: [
			m && h === "left" && m,
			v,
			m && h === "right" && m
		] })
	});
}
//#endregion
export { u as Button, o as buttonVariants };

//# sourceMappingURL=button.js.map