import React, { PureComponent } from "react";
import { TouchableOpacity, View } from "react-native";
import { Text } from "./Text";
import { connect } from "react-redux";
import { Icon } from "@rneui/themed";
import { getLightBrandingColourFromState, getMainBrandingColourFromState } from "../colours";
class Attachment extends PureComponent {
  render() {
    return /*#__PURE__*/React.createElement(TouchableOpacity, {
      key: this.props.key,
      onPress: this.props.onPress
    }, /*#__PURE__*/React.createElement(View, {
      style: [styles.pdfAttachment, {
        backgroundColor: this.props.colourBrandingLight
      }]
    }, /*#__PURE__*/React.createElement(Icon, {
      name: "paperclip",
      type: "font-awesome",
      iconStyle: [styles.pdfAttachmentIcon, {
        color: this.props.colourBrandingMain
      }]
    }), /*#__PURE__*/React.createElement(Text, {
      style: [styles.pdfAttachmentText, {
        color: this.props.colourBrandingMain
      }]
    }, this.props.title)));
  }
}
const styles = {
  pdfAttachment: {
    padding: 4,
    flexDirection: "row",
    borderRadius: 2,
    marginTop: 8,
    alignItems: "center",
    alignSelf: "flex-start"
  },
  pdfAttachmentIcon: {
    fontSize: 16,
    marginRight: 4
  },
  pdfAttachmentText: {
    fontFamily: "sf-semibold",
    fontSize: 13
  }
};
const mapStateToProps = state => {
  return {
    colourBrandingMain: getMainBrandingColourFromState(state),
    colourBrandingLight: getLightBrandingColourFromState(state)
  };
};
const attachment = connect(mapStateToProps, {})(Attachment);
export { attachment as Attachment };
//# sourceMappingURL=Attachment.js.map