'use strict';

var jsxRuntime = require('react/jsx-runtime');
var index = require('../index-vioSzJOw.js');
var utils = require('../utils-BhM0B89p.js');
var separator = require('../separator-DSL-aG1J.js');
var index$1 = require('../index-DuNgWCXZ.js');
require('react');
require('../index-DMbj7vXd.js');
require('react-dom');
require('../index-D-iDn9RI.js');

const buttonGroupVariants = index.cva(
  "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
  {
    variants: {
      orientation: {
        horizontal: "[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-e-lg!",
        vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"
      }
    },
    defaultVariants: {
      orientation: "horizontal"
    }
  }
);
function ButtonGroup$1({
  className,
  orientation,
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    "div",
    {
      role: "group",
      "data-slot": "button-group",
      "data-orientation": orientation,
      className: utils.cn(buttonGroupVariants({ orientation }), className),
      ...props
    }
  );
}
function ButtonGroupText$1({
  className,
  asChild = false,
  ...props
}) {
  const Comp = asChild ? index$1.Slot : "div";
  return /* @__PURE__ */ jsxRuntime.jsx(
    Comp,
    {
      className: utils.cn(
        "flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
        className
      ),
      ...props
    }
  );
}
function ButtonGroupSeparator$1({
  className,
  orientation = "vertical",
  ...props
}) {
  return /* @__PURE__ */ jsxRuntime.jsx(
    separator.Separator,
    {
      "data-slot": "button-group-separator",
      orientation,
      className: utils.cn(
        "relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
        className
      ),
      ...props
    }
  );
}

const ButtonGroup = (props) => /* @__PURE__ */ jsxRuntime.jsx(ButtonGroup$1, { ...props });
const ButtonGroupSeparator = (props) => /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupSeparator$1, { ...props });
const ButtonGroupText = (props) => /* @__PURE__ */ jsxRuntime.jsx(ButtonGroupText$1, { ...props });

exports.ButtonGroup = ButtonGroup;
exports.ButtonGroupSeparator = ButtonGroupSeparator;
exports.ButtonGroupText = ButtonGroupText;
exports.buttonGroupVariants = buttonGroupVariants;
//# sourceMappingURL=ButtonGroup.js.map
