"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/board-card-primitives.tsx
import { jsx, jsxs } from "react/jsx-runtime";
function BoardCardIconRow({
  iconClass,
  children
}) {
  return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
    /* @__PURE__ */ jsx(
      "i",
      {
        className: cn(
          `fa-light ${iconClass} text-xs text-muted-foreground mt-0.5 w-4 shrink-0 text-center`
        ),
        "aria-hidden": true
      }
    ),
    /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-xs leading-snug [&_.text-sm]:text-xs [&_span]:text-xs [&_div]:text-xs", children })
  ] });
}
function BoardCardTwoLineBlock({
  iconClass,
  line1,
  line2,
  line2ClassName
}) {
  const showLine2 = line2 !== void 0 && line2 !== null;
  return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
    /* @__PURE__ */ jsx(
      "i",
      {
        className: cn(
          `fa-light ${iconClass} text-xs text-muted-foreground mt-0.5 w-4 shrink-0 text-center`
        ),
        "aria-hidden": true
      }
    ),
    /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
      /* @__PURE__ */ jsx("div", { className: "truncate text-xs font-medium text-foreground leading-tight", children: line1 }),
      showLine2 ? /* @__PURE__ */ jsx(
        "div",
        {
          className: cn(
            "mt-0.5 min-w-0 leading-tight",
            line2ClassName ?? "truncate text-xs text-muted-foreground"
          ),
          children: line2
        }
      ) : null
    ] })
  ] });
}
function lineClampClass(n) {
  const base = "min-w-0 overflow-hidden break-words";
  if (n === 1) return cn(base, "line-clamp-1");
  if (n === 2) return cn(base, "line-clamp-2");
  return cn(base, "line-clamp-3");
}
function BoardNewCardPlaceholder({ position }) {
  return /* @__PURE__ */ jsxs(
    "button",
    {
      type: "button",
      className: cn(
        "flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border bg-background/50 py-2 text-xs font-medium text-muted-foreground transition-colors",
        "hover:border-input hover:bg-muted/40 hover:text-foreground",
        position === "above" ? "mb-2" : "mt-2"
      ),
      children: [
        /* @__PURE__ */ jsx("i", { className: "fa-light fa-plus text-xs", "aria-hidden": "true" }),
        "New card"
      ]
    }
  );
}
export {
  BoardCardIconRow,
  BoardCardTwoLineBlock,
  BoardNewCardPlaceholder,
  lineClampClass
};
//# sourceMappingURL=board-card-primitives.js.map