"use client";

// src/lib/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn(...inputs) {
  return twMerge(clsx(inputs));
}

// src/components/data-views/os-folder-glyph.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var OS_FOLDER_GLYPH_SRC = "/folders/icons8-folder-windows-11.svg";
var COLOR_TINT_FILTER = {
  brand: "hue-rotate(-42deg) saturate(1.25) brightness(0.97)",
  success: "hue-rotate(82deg) saturate(1.2) brightness(0.95)",
  warning: "hue-rotate(-5deg) saturate(1.35) brightness(1.02)",
  destructive: "hue-rotate(300deg) saturate(1.15) brightness(0.92)",
  muted: "saturate(0.15) brightness(1.08)",
  chart1: "hue-rotate(200deg) saturate(1.2) brightness(0.96)",
  chart2: "hue-rotate(95deg) saturate(1.15) brightness(0.96)",
  chart3: "hue-rotate(265deg) saturate(1.2) brightness(0.96)"
};
var SIZE_MAP = {
  /** Compact — folder inspector / column headers (matches ~36px row height). */
  xs: "h-9 w-[2.6rem]",
  sm: "h-[3.35rem] w-[3.85rem]",
  md: "h-[4.6rem] w-[5.25rem]",
  lg: "h-[6.5rem] w-[7.25rem]"
};
var ICON_TEXT = {
  xs: "text-[13px] leading-none",
  sm: "text-lg",
  md: "text-2xl",
  lg: "text-4xl"
};
var ICON_COLOR = {
  brand: "text-orange-800 dark:text-orange-600",
  success: "text-emerald-800 dark:text-emerald-600",
  warning: "text-amber-800 dark:text-amber-600",
  destructive: "text-red-800 dark:text-red-600",
  muted: "text-slate-600 dark:text-slate-400",
  chart1: "text-blue-800 dark:text-blue-600",
  chart2: "text-lime-800 dark:text-lime-600",
  chart3: "text-purple-800 dark:text-purple-600"
};
function OsFolderGlyph({
  colorKey,
  icon,
  size = "md",
  className,
  variant = "solid",
  decorative = true,
  label
}) {
  const outline = variant === "outline";
  const tint = COLOR_TINT_FILTER[colorKey];
  return /* @__PURE__ */ jsxs(
    "div",
    {
      className: cn(
        "group relative shrink-0 select-none transition-[transform,box-shadow] duration-200 ease-out",
        "hover:z-[1] hover:scale-105 motion-reduce:transform-none motion-reduce:hover:scale-100",
        SIZE_MAP[size],
        className
      ),
      role: !decorative && label ? "img" : void 0,
      "aria-label": !decorative ? label : void 0,
      "aria-hidden": decorative ? true : void 0,
      children: [
        /* @__PURE__ */ jsx(
          "img",
          {
            src: OS_FOLDER_GLYPH_SRC,
            alt: "",
            width: 240,
            height: 240,
            draggable: false,
            loading: "lazy",
            decoding: "async",
            className: cn(
              "size-full object-contain",
              "transition-[filter] duration-200",
              outline && "opacity-75 saturate-[0.65]"
            ),
            style: outline ? void 0 : { filter: tint }
          }
        ),
        /* @__PURE__ */ jsx(
          "span",
          {
            className: cn(
              "pointer-events-none absolute inset-0 flex items-center justify-center",
              size === "xs" ? "translate-y-[0.18rem]" : "translate-y-[0.35rem]",
              ICON_TEXT[size],
              outline ? "text-muted-foreground" : cn(ICON_COLOR[colorKey], "opacity-100")
            ),
            children: /* @__PURE__ */ jsx("i", { className: cn("fa-solid", icon), "aria-hidden": "true" })
          }
        )
      ]
    }
  );
}
export {
  OS_FOLDER_GLYPH_SRC,
  OsFolderGlyph
};
//# sourceMappingURL=os-folder-glyph.js.map