"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ActionButton = void 0;
var _react = _interopRequireDefault(require("react"));
var _StyledComponents = require("./StyledComponents");
var _icons = require("../../assets/icons");
var _reactRedux = require("react-redux");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const ActionButton = ({
  icon,
  ...props
}) => {
  const config = (0, _reactRedux.useSelector)(state => state.chatSettingStore.config);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledComponents.IconButton, {
    style: {
      height: 40,
      width: 40,
      borderRadius: 8,
      backgroundColor: '#fff',
      border: `1px solid ${config?.colors?.primary || '#0052CD'}`,
      ...props.style
    },
    ...props,
    children: icon ? (/*#__PURE__*/_react.default.cloneElement(icon, {
      style: {
        width: 40,
        height: 40
      }
    })) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.DownloadIcon, {
      style: {
        width: 40,
        height: 40
      }
    })
  });
};
exports.ActionButton = ActionButton;
//# sourceMappingURL=ActionButton.js.map