import React, { PureComponent } from "react";
import { View, TouchableOpacity } from "react-native";
import { Text } from "./Text";
import { Icon } from "@rneui/themed";
import { connect } from "react-redux";
import { TEXT_DARK, TEXT_LIGHT, getMainBrandingColourFromState } from "../colours";
import { FormCardSection } from "./FormCardSection";
class FormCardSectionOptionLauncher extends PureComponent {
  render() {
    const {
      onPress,
      sectionStyle,
      textStyle,
      title,
      description,
      value,
      icon,
      colourBrandingMain
    } = this.props;
    return /*#__PURE__*/React.createElement(TouchableOpacity, {
      onPress: onPress
    }, /*#__PURE__*/React.createElement(FormCardSection, {
      hasContent: true,
      sectionStyle: sectionStyle
    }, /*#__PURE__*/React.createElement(View, {
      style: styles.container
    }, /*#__PURE__*/React.createElement(Text, {
      style: [styles.text, {
        marginRight: 16,
        flex: 1
      }, textStyle]
    }, title), /*#__PURE__*/React.createElement(Text, {
      style: [styles.text, {
        marginRight: 16
      }]
    }, value), /*#__PURE__*/React.createElement(Icon, {
      name: icon ? icon : "angle-right",
      type: "font-awesome",
      iconStyle: [styles.text, {
        fontSize: 20,
        color: colourBrandingMain
      }]
    })), description ? /*#__PURE__*/React.createElement(Text, {
      style: styles.description
    }, description) : null));
  }
}
const styles = {
  container: {
    flexDirection: "row",
    alignSelf: "stretch",
    alignItems: "center"
  },
  text: {
    fontFamily: "sf-regular",
    fontSize: 17,
    color: TEXT_DARK
  },
  description: {
    fontFamily: "sf-regular",
    fontSize: 15,
    color: TEXT_LIGHT,
    marginTop: 8
  }
};
const mapStateToProps = state => {
  return {
    colourBrandingMain: getMainBrandingColourFromState(state)
  };
};
const formCardSectionOptionLauncher = connect(mapStateToProps, {})(FormCardSectionOptionLauncher);
export { formCardSectionOptionLauncher as FormCardSectionOptionLauncher };
//# sourceMappingURL=FormCardSectionOptionLauncher.js.map