"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { Button } from "@open-mercato/ui/primitives/button";
function SavedViewTabs({ tabs, activeId, onSelect, className, ariaLabel }) {
  return /* @__PURE__ */ jsx(
    "div",
    {
      role: "tablist",
      "aria-label": ariaLabel ?? "Saved views",
      className: `flex items-center gap-1 border-b border-border ${className ?? ""}`,
      children: tabs.map((tab) => {
        const isActive = tab.id === activeId;
        return /* @__PURE__ */ jsxs(
          Button,
          {
            type: "button",
            variant: "ghost",
            size: "sm",
            role: "tab",
            "aria-selected": isActive,
            className: `h-auto rounded-none px-3 py-2 text-sm hover:bg-transparent ${isActive ? "border-b-2 border-foreground font-medium text-foreground" : "border-b-2 border-transparent text-muted-foreground hover:text-foreground"}`,
            onClick: () => onSelect(tab.id),
            children: [
              tab.label,
              typeof tab.count === "number" ? /* @__PURE__ */ jsx("span", { className: "ml-1.5 text-xs text-muted-foreground/70 tabular-nums", children: tab.count }) : null
            ]
          },
          tab.id
        );
      })
    }
  );
}
export {
  SavedViewTabs
};
//# sourceMappingURL=SavedViewTabs.js.map
