import { s as __toESM } from "./chunk-BNovOVIE.js";
import { g as cn, r as cva } from "./button-Dj4BTre0.js";
import { t as require_react } from "./react-DA-nE2FX.js";
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
import { t as toDate } from "./toDate-CIpC_34u.js";
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
import { i as tableFromIPC } from "./loader-Dr8Qem8p.js";
function isDate(e) {
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
}
function isValid(e) {
  return !(!isDate(e) && typeof e != "number" || isNaN(+toDate(e)));
}
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((e, f) => {
  let p = (0, import_compiler_runtime.c)(11), m, h, g;
  p[0] === e ? (m = p[1], h = p[2], g = p[3]) : ({ className: m, variant: g, ...h } = e, p[0] = e, p[1] = m, p[2] = h, p[3] = g);
  let _;
  p[4] !== m || p[5] !== g ? (_ = cn(alertVariants({ variant: g }), m), p[4] = m, p[5] = g, p[6] = _) : _ = p[6];
  let v;
  return p[7] !== h || p[8] !== f || p[9] !== _ ? (v = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
    ref: f,
    role: "alert",
    className: _,
    ...h
  }), p[7] = h, p[8] = f, p[9] = _, p[10] = v) : v = p[10], v;
});
Alert.displayName = "Alert";
var AlertTitle = import_react.forwardRef((e, f) => {
  let p = (0, import_compiler_runtime.c)(11), m, h, g;
  p[0] === e ? (m = p[1], h = p[2], g = p[3]) : ({ className: h, children: m, ...g } = e, p[0] = e, p[1] = m, p[2] = h, p[3] = g);
  let _;
  p[4] === h ? _ = p[5] : (_ = cn("mb-1 font-medium leading-none tracking-tight", h), p[4] = h, p[5] = _);
  let v;
  return p[6] !== m || p[7] !== g || p[8] !== f || p[9] !== _ ? (v = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h5", {
    ref: f,
    className: _,
    ...g,
    children: m
  }), p[6] = m, p[7] = g, p[8] = f, p[9] = _, p[10] = v) : v = p[10], v;
});
AlertTitle.displayName = "AlertTitle";
var AlertDescription = import_react.forwardRef((e, f) => {
  let p = (0, import_compiler_runtime.c)(9), m, h;
  p[0] === e ? (m = p[1], h = p[2]) : ({ className: m, ...h } = e, p[0] = e, p[1] = m, p[2] = h);
  let g;
  p[3] === m ? g = p[4] : (g = cn("text-sm [&_p]:leading-relaxed", m), p[3] = m, p[4] = g);
  let _;
  return p[5] !== h || p[6] !== f || p[7] !== g ? (_ = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
    ref: f,
    className: g,
    ...h
  }), p[5] = h, p[6] = f, p[7] = g, p[8] = _) : _ = p[8], _;
});
AlertDescription.displayName = "AlertDescription";
function arrow(e) {
  function d(e2) {
    return !!(e2 == null ? void 0 : e2.schema) && Array.isArray(e2.schema.fields) && typeof e2.toArray == "function";
  }
  return (d(e) ? e : decodeIPC(e)).toArray();
}
arrow.responseType = "arrayBuffer";
function decodeIPC(e, d) {
  return tableFromIPC(e, d ?? { useProxy: true });
}
export {
  isValid as a,
  AlertTitle as i,
  Alert as n,
  AlertDescription as r,
  arrow as t
};
