import { s as __toESM } from "./chunk-BNovOVIE.js";
import { t as require_react } from "./react-Bs6Z0kvn.js";
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
import { t as toDate } from "./toDate-CUqpEbBS.js";
import { r as cva, y as cn } from "./button-DNlNlZY_.js";
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
import { C as dequal } from "./useTheme-MWfxn4oz.js";
import { i as tableFromIPC } from "./loader-Bd1kgLn7.js";
function isDate(t) {
  return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
}
function isValid(t) {
  return !(!isDate(t) && typeof t != "number" || isNaN(+toDate(t)));
}
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), alertVariants = cva("relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:text-foreground [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:translate-y-[-3px] [&:has(svg)]:pl-11", {
  variants: { variant: {
    default: "bg-background text-foreground",
    destructive: "text-destructive border-destructive/50 dark:border-destructive [&>svg]:text-destructive text-destructive",
    info: "bg-(--sky-2) border-(--sky-7) text-(--sky-11)",
    warning: "bg-(--yellow-2) border-(--yellow-7) text-(--yellow-11) [&>svg]:text-(--yellow-11)"
  } },
  defaultVariants: { variant: "default" }
}), Alert = import_react.forwardRef((t, m) => {
  let h = (0, import_compiler_runtime.c)(11), g, _, v;
  h[0] === t ? (g = h[1], _ = h[2], v = h[3]) : ({ className: g, variant: v, ..._ } = t, h[0] = t, h[1] = g, h[2] = _, h[3] = v);
  let y;
  h[4] !== g || h[5] !== v ? (y = cn(alertVariants({ variant: v }), g), h[4] = g, h[5] = v, h[6] = y) : y = h[6];
  let b;
  return h[7] !== _ || h[8] !== m || h[9] !== y ? (b = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
    ref: m,
    role: "alert",
    className: y,
    ..._
  }), h[7] = _, h[8] = m, h[9] = y, h[10] = b) : b = h[10], b;
});
Alert.displayName = "Alert";
var AlertTitle = import_react.forwardRef((t, m) => {
  let h = (0, import_compiler_runtime.c)(11), g, _, v;
  h[0] === t ? (g = h[1], _ = h[2], v = h[3]) : ({ className: _, children: g, ...v } = t, h[0] = t, h[1] = g, h[2] = _, h[3] = v);
  let y;
  h[4] === _ ? y = h[5] : (y = cn("mb-1 font-medium leading-none tracking-tight", _), h[4] = _, h[5] = y);
  let b;
  return h[6] !== g || h[7] !== v || h[8] !== m || h[9] !== y ? (b = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h5", {
    ref: m,
    className: y,
    ...v,
    children: g
  }), h[6] = g, h[7] = v, h[8] = m, h[9] = y, h[10] = b) : b = h[10], b;
});
AlertTitle.displayName = "AlertTitle";
var AlertDescription = import_react.forwardRef((t, m) => {
  let h = (0, import_compiler_runtime.c)(9), g, _;
  h[0] === t ? (g = h[1], _ = h[2]) : ({ className: g, ..._ } = t, h[0] = t, h[1] = g, h[2] = _);
  let v;
  h[3] === g ? v = h[4] : (v = cn("text-sm [&_p]:leading-relaxed", g), h[3] = g, h[4] = v);
  let y;
  return h[5] !== _ || h[6] !== m || h[7] !== v ? (y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
    ref: m,
    className: v,
    ..._
  }), h[5] = _, h[6] = m, h[7] = v, h[8] = y) : y = h[8], y;
});
AlertDescription.displayName = "AlertDescription";
function arrow(t) {
  function m(t2) {
    return !!(t2 == null ? void 0 : t2.schema) && Array.isArray(t2.schema.fields) && typeof t2.toArray == "function";
  }
  return (m(t) ? t : decodeIPC(t)).toArray();
}
arrow.responseType = "arrayBuffer";
function decodeIPC(t, m) {
  return tableFromIPC(t, m ?? { useProxy: true });
}
function useDeepCompareMemoize(t) {
  let m = import_react.useRef(t);
  return dequal(t, m.current) || (m.current = t), m.current;
}
export {
  AlertTitle as a,
  AlertDescription as i,
  arrow as n,
  isValid as o,
  Alert as r,
  useDeepCompareMemoize as t
};
