"use client";
import { jsx } from "react/jsx-runtime";
import { useT } from "@open-mercato/shared/lib/i18n/context";
function Spinner({ className = "", size = "md" }) {
  const t = useT();
  const sizeClasses = {
    sm: "h-4 w-4",
    md: "h-6 w-6",
    lg: "h-8 w-8"
  };
  return /* @__PURE__ */ jsx(
    "span",
    {
      className: `inline-flex items-center justify-center animate-spin rounded-full border-2 border-border border-t-foreground ${sizeClasses[size]} ${className}`,
      role: "status",
      "aria-label": t("ui.spinner.ariaLabel", "Loading"),
      children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("ui.spinner.srOnly", "Loading...") })
    }
  );
}
export {
  Spinner
};
//# sourceMappingURL=spinner.js.map
