import "@parallel-line/common/es/common/access/style";
import _Access from "@parallel-line/common/es/common/access";
var _excluded = ["prefixCls", "className", "color", "code"];

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import * as React from 'react';
import classNames from 'classnames';
import ConfigProvider from '../config-provider';
import Button from 'antd/es/button';

var InlineButton = function InlineButton(props) {
  var _React$useContext = React.useContext(ConfigProvider.Context),
      getPrefixCls = _React$useContext.getPrefixCls;

  var customizePrefixCls = props.prefixCls,
      className = props.className,
      color = props.color,
      code = props.code,
      otherProps = _objectWithoutProperties(props, _excluded);

  var prefixCls = getPrefixCls('button', customizePrefixCls);
  return /*#__PURE__*/React.createElement(_Access, {
    code: code
  }, /*#__PURE__*/React.createElement(Button, Object.assign({}, otherProps, {
    className: classNames(className, color && "".concat(prefixCls, "-").concat(color)),
    prefixCls: prefixCls
  })));
};

InlineButton.defaultProps = {
  type: 'default',
  size: 'middle',
  loading: false,
  disabled: false,
  danger: false,
  block: false,
  ghost: false
};
export var Group = function Group(props) {
  return /*#__PURE__*/React.createElement(Button.Group, Object.assign({}, props, {
    prefixCls: "".concat(props.prefixCls, "-button-group")
  }));
};
Group.defaultProps = {
  prefixCls: 'pxx'
};
export default InlineButton;