'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var neetoAtoms = require('@bigbinary/neeto-atoms');
var reactI18next = require('react-i18next');
var jsxRuntime = require('react/jsx-runtime');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWithoutProperties);

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

exports.FormikActionBlock = FormikActionBlock;
//# sourceMappingURL=ActionBlock-C9Iy0jGZ.js.map
