"use client";
import { jsx } from "react/jsx-runtime";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { forwardRef } from "react";
const DropdownButton = forwardRef(
  ({ asChild, disabled, onClick, children, ...props }, ref) => {
    if (asChild) {
      return /* @__PURE__ */ jsx(
        DropdownMenuPrimitive.Trigger,
        {
          ref,
          asChild: true,
          disabled,
          onClick: disabled ? void 0 : onClick,
          ...props,
          children
        }
      );
    } else {
      return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { asChild: true, disabled, onClick: disabled ? void 0 : onClick, ...props, children: /* @__PURE__ */ jsx(
        "div",
        {
          ref,
          role: "button",
          "aria-disabled": disabled ? "true" : void 0,
          tabIndex: disabled ? -1 : 0,
          children
        }
      ) });
    }
  }
);
DropdownButton.displayName = "Dropdown.Button";
export {
  DropdownButton
};
