"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import * as React from "react";
import { ChevronDown } from "lucide-react";
import { Button } from "@open-mercato/ui/primitives/button";
const ChipButton = React.forwardRef(
  function ChipButton2({ label, value, active = false, ariaLabel, onClick, withChevron = true }, ref) {
    return /* @__PURE__ */ jsxs(
      Button,
      {
        variant: "ghost",
        size: "sm",
        ref,
        type: "button",
        onClick,
        "aria-label": ariaLabel ?? (label ? `${label}: ${value}` : value),
        "aria-pressed": active,
        className: `inline-flex items-center gap-1.5 rounded-sm border border-border bg-card px-2.5 py-1.5 text-xs leading-normal transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${active ? "border-foreground/40 bg-muted text-foreground" : "text-foreground"}`,
        children: [
          label ? /* @__PURE__ */ jsxs("span", { className: "font-normal text-muted-foreground", children: [
            label,
            ":"
          ] }) : null,
          /* @__PURE__ */ jsx("span", { className: label ? "font-semibold text-foreground" : "font-normal text-foreground", children: value }),
          withChevron ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3 text-muted-foreground", "aria-hidden": "true" }) : null
        ]
      }
    );
  }
);
var ChipButton_default = ChipButton;
export {
  ChipButton,
  ChipButton_default as default
};
//# sourceMappingURL=ChipButton.js.map
