import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import withStyles from '../styles/withStyles';
import '../Button'; // So we don't have any override priority issue.

export const styles = {
  /* Styles applied to the root element. */
  root: {
    display: 'flex',
    alignItems: 'center',
    padding: 8
  },

  /* Styles applied to the root element if `disableSpacing={false}`. */
  spacing: {
    '& > * + *': {
      marginLeft: 8
    }
  }
};
const CardActions = React.forwardRef(function CardActions(props, ref) {
  const {
    disableSpacing = false,
    classes,
    className
  } = props,
        other = _objectWithoutPropertiesLoose(props, ["disableSpacing", "classes", "className"]);

  return React.createElement("div", _extends({
    className: clsx(classes.root, !disableSpacing && classes.spacing, className),
    ref: ref
  }, other));
});
process.env.NODE_ENV !== "production" ? CardActions.propTypes = {
  /**
   * The content of the component.
   */
  children: PropTypes.node,

  /**
   * Override or extend the styles applied to the component.
   * See [CSS API](#css) below for more details.
   */
  classes: PropTypes.object.isRequired,

  /**
   * @ignore
   */
  className: PropTypes.string,

  /**
   * If `true`, the actions do not have additional margin.
   */
  disableSpacing: PropTypes.bool
} : void 0;
export default withStyles(styles, {
  name: 'MuiCardActions'
})(CardActions);