"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import * as React from "react";
import { cn } from "@open-mercato/shared/lib/utils";
import { inputWrapperVariants, inputElementVariants } from "./input.js";
const ButtonInput = React.forwardRef(
  ({ className, inputClassName, size, leftIcon, trailingAction, disabled, ...props }, ref) => {
    return /* @__PURE__ */ jsxs(
      "div",
      {
        className: cn(inputWrapperVariants({ size }), "px-0 overflow-hidden", className),
        "data-slot": "button-input-wrapper",
        children: [
          /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 items-center gap-2 pl-3 pr-2", children: [
            leftIcon ? /* @__PURE__ */ jsx(
              "span",
              {
                className: "flex shrink-0 items-center text-muted-foreground [&_svg]:size-4",
                "aria-hidden": "true",
                children: leftIcon
              }
            ) : null,
            /* @__PURE__ */ jsx(
              "input",
              {
                ref,
                disabled,
                className: cn(
                  inputElementVariants({ size }),
                  inputClassName
                ),
                ...props
              }
            )
          ] }),
          /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "w-px self-stretch bg-input" }),
          /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-stretch", children: trailingAction })
        ]
      }
    );
  }
);
ButtonInput.displayName = "ButtonInput";
export {
  ButtonInput
};
//# sourceMappingURL=button-input.js.map
