import {
  cn,
  cva
} from "/build/_shared/chunk-LGQ4GCFK.js";
import {
  require_jsx_dev_runtime
} from "/build/_shared/chunk-ED7KKCRB.js";
import {
  createHotContext,
  init_remix_hmr
} from "/build/_shared/chunk-G7KTOMTD.js";
import {
  __toESM
} from "/build/_shared/chunk-PNG5AS42.js";

// app/components/ui/badge.tsx
init_remix_hmr();
var import_jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
if (!window.$RefreshReg$ || !window.$RefreshSig$ || !window.$RefreshRuntime$) {
  console.warn("remix:hmr: React Fast Refresh only works when the Remix compiler is running in development mode.");
} else {
  prevRefreshReg = window.$RefreshReg$;
  prevRefreshSig = window.$RefreshSig$;
  window.$RefreshReg$ = (type, id) => {
    window.$RefreshRuntime$.register(type, '"app/components/ui/badge.tsx"' + id);
  };
  window.$RefreshSig$ = window.$RefreshRuntime$.createSignatureFunctionForTransform;
}
var prevRefreshReg;
var prevRefreshSig;
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/components/ui/badge.tsx"
  );
  import.meta.hot.lastModified = "1711234838351.1355";
}
var badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
  variants: {
    variant: {
      default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary hover:opacity-80",
      secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary hover:opacity-80",
      destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive hover:opacity-80",
      outline: "text-foreground",
      white: "border-transparent bg-neutral-300 text-black shadow hover:bg-neutral-300 hover:opacity-80",
      rose: "border-transparent bg-rose-500 text-primary-foreground shadow hover:bg-rose-500 hover:opacity-80",
      pink: "border-transparent bg-pink-500 text-primary-foreground shadow hover:bg-pink-500 hover:opacity-80",
      fuchsia: "border-transparent bg-fuchsia-500 text-primary-foreground shadow hover:bg-fuchsia-500 hover:opacity-80",
      purple: "border-transparent bg-purple-500 text-primary-foreground shadow hover:bg-purple-500 hover:opacity-80",
      violet: "border-transparent bg-violet-500 text-primary-foreground shadow hover:bg-violet-500 hover:opacity-80",
      indigo: "border-transparent bg-indigo-500 text-primary-foreground shadow hover:bg-indigo-500 hover:opacity-80",
      blue: "border-transparent bg-blue-500 text-primary-foreground shadow hover:bg-blue-500 hover:opacity-80",
      sky: "border-transparent bg-sky-500 text-primary-foreground shadow hover:bg-sky-500 hover:opacity-80",
      cyan: "border-transparent bg-cyan-500 text-primary-foreground shadow hover:bg-cyan-500 hover:opacity-80",
      teal: "border-transparent bg-teal-500 text-primary-foreground shadow hover:bg-teal-500 hover:opacity-80",
      emerald: "border-transparent bg-emerald-500 text-primary-foreground shadow hover:bg-emerald-500 hover:opacity-80",
      green: "border-transparent bg-green-500 text-primary-foreground shadow hover:bg-green-500 hover:opacity-80",
      lime: "border-transparent bg-lime-500 text-primary-foreground shadow hover:bg-lime-500 hover:opacity-80",
      yellow: "border-transparent bg-yellow-500 text-primary-foreground shadow hover:bg-yellow-500 hover:opacity-80",
      amber: "border-transparent bg-amber-500 text-primary-foreground shadow hover:bg-amber-500 hover:opacity-80",
      orange: "border-transparent bg-orange-500 text-primary-foreground shadow hover:bg-orange-500 hover:opacity-80",
      red: "border-transparent bg-red-500 text-primary-foreground shadow hover:bg-red-500 hover:opacity-80"
    }
  },
  defaultVariants: {
    variant: "default"
  }
});
function Badge({
  className,
  variant,
  ...props
}) {
  return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("div", { className: cn(badgeVariants({
    variant
  }), className), ...props }, void 0, false, {
    fileName: "app/components/ui/badge.tsx",
    lineNumber: 60,
    columnNumber: 10
  }, this);
}
_c = Badge;
var _c;
$RefreshReg$(_c, "Badge");
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;

// app/pages/traces/utils/idShortener.ts
init_remix_hmr();
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/pages/traces/utils/idShortener.ts"
  );
  import.meta.hot.lastModified = "1711033456010.5415";
}
var idShortener = (id) => {
  const short = id.substring(id.length - 4);
  const lastLetterAscii = id.charCodeAt(id.length - 1);
  const variants = [
    "pink",
    "rose",
    "fuchsia",
    "purple",
    "violet",
    "indigo",
    "blue",
    "sky",
    "cyan",
    "teal",
    "emerald",
    "green",
    "lime",
    "yellow",
    "amber",
    "orange",
    "red"
  ];
  const adjustedAsciiIndex = lastLetterAscii % variants.length;
  const variant = variants[adjustedAsciiIndex];
  return {
    short,
    variant
  };
};

export {
  Badge,
  idShortener
};
//# sourceMappingURL=/build/_shared/chunk-634BMO4L.js.map
