// src/components/NavButton/NavButton.tsx
import { forwardRef } from "react";

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

// src/components/NavButton/NavButton.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var NavButton = forwardRef(
  ({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
    const baseClasses = [
      "flex",
      "flex-col",
      "items-center",
      "justify-center",
      "gap-0.5",
      "px-12",
      "py-1",
      "rounded-sm",
      "cursor-pointer",
      "text-text-950",
      "text-xs",
      "font-medium",
      "hover:text-text",
      "hover:bg-primary-600",
      "focus-visible:outline-none",
      "focus-visible:ring-2",
      "focus-visible:ring-offset-0",
      "focus-visible:ring-indicator-info",
      "disabled:opacity-50",
      "disabled:cursor-not-allowed",
      "disabled:pointer-events-none"
    ];
    const stateClasses = selected ? ["bg-primary-50", "text-primary-950"] : [];
    const allClasses = [...baseClasses, ...stateClasses].join(" ");
    return /* @__PURE__ */ jsxs(
      "button",
      {
        ref,
        type: "button",
        className: cn(allClasses, className),
        disabled,
        "aria-pressed": selected,
        ...props,
        children: [
          /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center w-5 h-5", children: icon }),
          /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: label })
        ]
      }
    );
  }
);
NavButton.displayName = "NavButton";
var NavButton_default = NavButton;
export {
  NavButton_default as default
};
//# sourceMappingURL=index.mjs.map