import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import { Button, cn } from '@bigbinary/neeto-atoms';
import { useTranslation } from 'react-i18next';
import { jsxs, jsx } from 'react/jsx-runtime';

var _excluded = ["label", "className"],
  _excluded2 = ["label", "className", "disabled"];
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 FormikActionBlock = function FormikActionBlock(_ref) {
  var isSubmitting = _ref.isSubmitting,
    _ref$cancelButtonProp = _ref.cancelButtonProps,
    cancelButtonProps = _ref$cancelButtonProp === void 0 ? {} : _ref$cancelButtonProp,
    _ref$submitButtonProp = _ref.submitButtonProps,
    submitButtonProps = _ref$submitButtonProp === void 0 ? {} : _ref$submitButtonProp,
    className = _ref.className;
  var _useTranslation = useTranslation(),
    t = _useTranslation.t;
  var cancelLabel = cancelButtonProps.label,
    cancelClassName = cancelButtonProps.className,
    cancelRest = _objectWithoutProperties(cancelButtonProps, _excluded);
  var submitLabel = submitButtonProps.label,
    submitClassName = submitButtonProps.className,
    submitDisabled = submitButtonProps.disabled,
    submitRest = _objectWithoutProperties(submitButtonProps, _excluded2);
  return /*#__PURE__*/jsxs("div", {
    className: cn("flex items-center gap-2", className),
    children: [/*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
      className: submitClassName,
      disabled: isSubmitting || submitDisabled,
      type: "submit"
    }, submitRest), {}, {
      children: submitLabel || t("neetoTeamMembers.buttons.saveChanges")
    })), /*#__PURE__*/jsx(Button, _objectSpread(_objectSpread({
      className: cancelClassName,
      type: "button",
      variant: "outline"
    }, cancelRest), {}, {
      children: cancelLabel || t("neetoTeamMembers.buttons.cancel")
    }))]
  });
};

export { FormikActionBlock as F };
//# sourceMappingURL=ActionBlock-jgw1N-As.js.map
