import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import classnames from 'classnames';
import Button from '@bigbinary/neetoui/Button';
import { n } from './inject-css-C2dztUxs.js';
import { createElement } from 'react';
import { jsx } from 'react/jsx-runtime';

var css = ".neeto-molecules-button-group{border-radius:var(--neeto-ui-rounded-md);display:flex}.neeto-molecules-button-group .neeto-ui-btn{margin-left:-.0625rem}.neeto-molecules-button-group .neeto-ui-btn.neeto-molecules-button-group__btn--active{--neeto-ui-btn-color:rgb(var(--neeto-ui-primary-500));--neeto-ui-btn-bg-color:rgb(var(--neeto-ui-primary-100));--neeto-ui-btn-hover-color:rgb(var(--neeto-ui-primary-500));--neeto-ui-btn-hover-bg-color:rgb(var(--neeto-ui-primary-100));--neeto-ui-btn-focus-color:rgb(var(--neeto-ui-primary-600));z-index:1}.neeto-molecules-button-group .neeto-ui-btn:first-child{border-bottom-right-radius:0;border-left:0;border-top-right-radius:0;margin-left:0}.neeto-molecules-button-group .neeto-ui-btn:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.neeto-molecules-button-group .neeto-ui-btn:not(:first-child):not(:last-child){border-radius:0}";
n(css,{});

var _excluded = ["key", "isActive"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var ButtonGroup = function ButtonGroup(_ref) {
  var buttons = _ref.buttons,
    _ref$size = _ref.size,
    size = _ref$size === void 0 ? "medium" : _ref$size;
  return /*#__PURE__*/jsx("div", {
    className: "neeto-molecules-button-group",
    children: buttons.map(function (_ref2) {
      var key = _ref2.key,
        isActive = _ref2.isActive,
        buttonProps = _objectWithoutProperties(_ref2, _excluded);
      return /*#__PURE__*/createElement(Button, _objectSpread({
        size: size,
        key: key,
        style: "tertiary",
        className: classnames({
          "neeto-molecules-button-group__btn--active": isActive
        })
      }, buttonProps));
    })
  });
};

export { ButtonGroup as default };
//# sourceMappingURL=ButtonGroup.js.map
