import { cn as e } from "../../../lib/utils.js";
import { jsx as t, jsxs as n } from "react/jsx-runtime";
//#region lib/components/ui/atoms/loader.tsx
function r({ className: n, size: r = "md" }) {
	return /* @__PURE__ */ t("div", {
		className: e("animate-spin rounded-full border-2 border-primary border-t-transparent", {
			sm: "size-4",
			md: "size-5",
			lg: "size-6"
		}[r], n),
		children: /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})
	});
}
var i = {
	sm: "-0.75px",
	md: "-1px",
	lg: "-1.25px"
}, a = {
	sm: "0.75px",
	md: "1px",
	lg: "1.25px"
}, o = {
	sm: "10px",
	md: "12px",
	lg: "14px"
};
function s({ className: r, size: s = "md" }) {
	let c = {
		sm: "size-4",
		md: "size-5",
		lg: "size-6"
	}, l = {
		sm: {
			height: "6px",
			width: "1.5px"
		},
		md: {
			height: "8px",
			width: "2px"
		},
		lg: {
			height: "10px",
			width: "2.5px"
		}
	};
	return /* @__PURE__ */ n("div", {
		className: e("relative", c[s], r),
		children: [/* @__PURE__ */ t("div", {
			className: "absolute h-full w-full",
			children: Array.from({ length: 12 }, (e, n) => /* @__PURE__ */ t("div", {
				className: "absolute animate-[spinner-fade_1.2s_linear_infinite] rounded-full bg-primary",
				style: {
					top: "0",
					left: "50%",
					marginLeft: i[s],
					transformOrigin: `${a[s]} ${o[s]}`,
					transform: `rotate(${n * 30}deg)`,
					opacity: 0,
					animationDelay: `${n * .1}s`,
					height: l[s].height,
					width: l[s].width
				}
			}, n))
		}), /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})]
	});
}
function c({ className: r, size: i = "md" }) {
	return /* @__PURE__ */ n("div", {
		className: e("relative", {
			sm: "size-4",
			md: "size-5",
			lg: "size-6"
		}[i], r),
		children: [/* @__PURE__ */ t("div", { className: "absolute inset-0 animate-[thin-pulse_1.5s_ease-in-out_infinite] rounded-full border-2 border-primary" }), /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})]
	});
}
function l({ className: n, size: r = "md" }) {
	return /* @__PURE__ */ t("div", {
		className: e("animate-[pulse-dot_1.2s_ease-in-out_infinite] rounded-full bg-primary", {
			sm: "size-1",
			md: "size-2",
			lg: "size-3"
		}[r], n),
		children: /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})
	});
}
function u({ className: r, size: i = "md" }) {
	let a = {
		sm: "h-1.5 w-1.5",
		md: "h-2 w-2",
		lg: "h-2.5 w-2.5"
	};
	return /* @__PURE__ */ n("div", {
		className: e("flex items-center space-x-1", {
			sm: "h-4",
			md: "h-5",
			lg: "h-6"
		}[i], r),
		children: [Array.from({ length: 3 }, (n, r) => /* @__PURE__ */ t("div", {
			className: e("animate-[bounce-dots_1.4s_ease-in-out_infinite] rounded-full bg-primary", a[i]),
			style: { animationDelay: `${r * 160}ms` }
		}, r)), /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})]
	});
}
function d({ className: r, size: i = "md" }) {
	let a = {
		sm: "h-1 w-1",
		md: "h-1.5 w-1.5",
		lg: "h-2 w-2"
	};
	return /* @__PURE__ */ n("div", {
		className: e("flex items-center space-x-1", {
			sm: "h-4",
			md: "h-5",
			lg: "h-6"
		}[i], r),
		children: [Array.from({ length: 3 }, (n, r) => /* @__PURE__ */ t("div", {
			className: e("animate-[typing_1s_infinite] rounded-full bg-primary", a[i]),
			style: { animationDelay: `${r * 250}ms` }
		}, r)), /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})]
	});
}
function f({ className: r, size: i = "md" }) {
	let a = {
		sm: "w-0.5",
		md: "w-0.5",
		lg: "w-1"
	}, o = {
		sm: "h-4",
		md: "h-5",
		lg: "h-6"
	}, s = {
		sm: [
			"6px",
			"9px",
			"12px",
			"9px",
			"6px"
		],
		md: [
			"8px",
			"12px",
			"16px",
			"12px",
			"8px"
		],
		lg: [
			"10px",
			"15px",
			"20px",
			"15px",
			"10px"
		]
	};
	return /* @__PURE__ */ n("div", {
		className: e("flex items-center gap-0.5", o[i], r),
		children: [Array.from({ length: 5 }, (n, r) => /* @__PURE__ */ t("div", {
			className: e("animate-[wave_1s_ease-in-out_infinite] rounded-full bg-primary", a[i]),
			style: {
				animationDelay: `${r * 100}ms`,
				height: s[i][r]
			}
		}, r)), /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})]
	});
}
function p({ className: r, size: i = "md" }) {
	let a = {
		sm: "w-1",
		md: "w-1.5",
		lg: "w-2"
	};
	return /* @__PURE__ */ n("div", {
		className: e("flex", {
			sm: "h-4 gap-1",
			md: "h-5 gap-1.5",
			lg: "h-6 gap-2"
		}[i], r),
		children: [Array.from({ length: 3 }, (n, r) => /* @__PURE__ */ t("div", {
			className: e("h-full animate-[wave-bars_1.2s_ease-in-out_infinite] bg-primary", a[i]),
			style: { animationDelay: `${r * .2}s` }
		}, r)), /* @__PURE__ */ t("span", {
			className: "sr-only",
			children: "Loading"
		})]
	});
}
function m({ className: r, size: i = "md" }) {
	return /* @__PURE__ */ n("div", {
		className: e("flex items-center space-x-1", {
			sm: "h-4",
			md: "h-5",
			lg: "h-6"
		}[i], r),
		children: [
			/* @__PURE__ */ t("span", {
				className: e("font-mono text-primary", {
					sm: "text-xs",
					md: "text-sm",
					lg: "text-base"
				}[i]),
				children: ">"
			}),
			/* @__PURE__ */ t("div", { className: e("animate-[blink_1s_step-end_infinite] bg-primary", {
				sm: "h-3 w-1.5",
				md: "h-4 w-2",
				lg: "h-5 w-2.5"
			}[i]) }),
			/* @__PURE__ */ t("span", {
				className: "sr-only",
				children: "Loading"
			})
		]
	});
}
function h({ text: n = "Thinking", className: r, size: i = "md" }) {
	return /* @__PURE__ */ t("div", {
		className: e("animate-[text-blink_2s_ease-in-out_infinite] font-medium", {
			sm: "text-xs",
			md: "text-sm",
			lg: "text-base"
		}[i], r),
		children: n
	});
}
function g({ text: n = "Thinking", className: r, size: i = "md" }) {
	return /* @__PURE__ */ t("div", {
		className: e("bg-[linear-gradient(to_right,var(--muted-foreground)_40%,var(--foreground)_60%,var(--muted-foreground)_80%)]", "bg-size-[200%_auto] bg-clip-text font-medium text-transparent", "animate-[shimmer_4s_infinite_linear]", {
			sm: "text-xs",
			md: "text-sm",
			lg: "text-base"
		}[i], r),
		children: n
	});
}
function _({ className: r, text: i = "Thinking", size: a = "md" }) {
	return /* @__PURE__ */ n("div", {
		className: e("inline-flex items-center", r),
		children: [/* @__PURE__ */ t("span", {
			className: e("font-medium text-muted-foreground", {
				sm: "text-xs",
				md: "text-sm",
				lg: "text-base"
			}[a]),
			children: i
		}), /* @__PURE__ */ n("span", {
			className: "inline-flex",
			children: [
				/* @__PURE__ */ t("span", {
					className: "animate-[loading-dots_1.4s_infinite_0.2s] text-muted-foreground",
					children: "."
				}),
				/* @__PURE__ */ t("span", {
					className: "animate-[loading-dots_1.4s_infinite_0.4s] text-muted-foreground",
					children: "."
				}),
				/* @__PURE__ */ t("span", {
					className: "animate-[loading-dots_1.4s_infinite_0.6s] text-muted-foreground",
					children: "."
				})
			]
		})]
	});
}
function v({ className: r, size: i = "md", text: a }) {
	return /* @__PURE__ */ n("div", {
		className: e("inline-flex items-center gap-1.5", r),
		children: [
			/* @__PURE__ */ t("span", {
				"aria-hidden": "true",
				className: e("before:animate-[braille-spin_0.8s_steps(10,end)_infinite] before:content-['⠋']", "font-mono text-primary leading-none", {
					sm: "text-sm",
					md: "text-base",
					lg: "text-lg"
				}[i])
			}),
			a && /* @__PURE__ */ t("span", {
				className: e("text-muted-foreground leading-none", {
					sm: "text-xs",
					md: "text-sm",
					lg: "text-base"
				}[i]),
				children: a
			}),
			!a && /* @__PURE__ */ t("span", {
				className: "sr-only",
				children: "Loading"
			})
		]
	});
}
function y({ variant: e = "circular", size: n = "md", text: i, className: a }) {
	switch (e) {
		case "circular": return /* @__PURE__ */ t(r, {
			className: a,
			size: n
		});
		case "classic": return /* @__PURE__ */ t(s, {
			className: a,
			size: n
		});
		case "pulse": return /* @__PURE__ */ t(c, {
			className: a,
			size: n
		});
		case "pulse-dot": return /* @__PURE__ */ t(l, {
			className: a,
			size: n
		});
		case "dots": return /* @__PURE__ */ t(u, {
			className: a,
			size: n
		});
		case "typing": return /* @__PURE__ */ t(d, {
			className: a,
			size: n
		});
		case "wave": return /* @__PURE__ */ t(f, {
			className: a,
			size: n
		});
		case "bars": return /* @__PURE__ */ t(p, {
			className: a,
			size: n
		});
		case "terminal": return /* @__PURE__ */ t(m, {
			className: a,
			size: n
		});
		case "text-blink": return /* @__PURE__ */ t(h, {
			className: a,
			size: n,
			text: i
		});
		case "text-shimmer": return /* @__PURE__ */ t(g, {
			className: a,
			size: n,
			text: i
		});
		case "loading-dots": return /* @__PURE__ */ t(_, {
			className: a,
			size: n,
			text: i
		});
		case "braille": return /* @__PURE__ */ t(v, {
			className: a,
			size: n,
			text: i
		});
		default: return /* @__PURE__ */ t(r, {
			className: a,
			size: n
		});
	}
}
//#endregion
export { y as Loader };
