import React, { PureComponent } from "react";
import { TouchableOpacity } from "react-native";
import { connect } from "react-redux";
import Styles from "../styles";
import { FontAwesome } from "./Icon";
import { getMainBrandingColourFromState } from "../colours";

/* 
Props- 
    onPress - onPress action
    diameter - size of button
    iconSize - size of inner plus
    color - default will be aveoMain
*/

class AddButton extends PureComponent {
  render() {
    const size = this.props.diameter || 48;
    const radius = size / 2;
    return /*#__PURE__*/React.createElement(TouchableOpacity, {
      style: [Styles.addButton, {
        height: size,
        width: size,
        borderRadius: radius,
        backgroundColor: this.props.colourBrandingMain
      }, this.props.color && {
        backgroundColor: this.props.color
      }, this.props.style],
      onPress: this.props.onPress
    }, /*#__PURE__*/React.createElement(FontAwesome, {
      name: "plus",
      style: Styles.addButtonIcon
    }));
  }
}
const mapStateToProps = state => {
  return {
    colourBrandingMain: getMainBrandingColourFromState(state)
  };
};
const addButton = connect(mapStateToProps, {})(AddButton);
export { addButton as AddButton };
//# sourceMappingURL=AddButton.js.map