import React, { Component } from "react";
import { View, TouchableOpacity } from "react-native";
import { Text } from "./Text";
class InlineButton extends Component {
  renderContent() {
    if (this.props.noText) {
      return this.props.children;
    }
    return /*#__PURE__*/React.createElement(Text, {
      style: [styles.text, (this.props.large || this.props.fullWidth) && styles.textLarge, this.props.textStyle],
      numberOfLines: this.props.numberOfLines || 1
    }, this.props.children);
  }
  renderExtra() {
    if (this.props.extraContent) {
      return this.props.extraContent;
    }
    return null;
  }
  render() {
    return /*#__PURE__*/React.createElement(TouchableOpacity, {
      style: [(this.props.fillTouchable || this.props.fullWidth) && {
        flexDirection: "row"
      }, this.props.fullWidth && {
        flex: 1
      }, this.props.disabled && this.props.disabledOpacity && {
        opacity: 0.4
      }, this.props.touchableStyle],
      onPress: this.props.onPress,
      disabled: this.props.disabled
    }, /*#__PURE__*/React.createElement(View, {
      style: [styles.container, (this.props.large || this.props.fullWidth) && styles.containerLarge, (this.props.fillTouchable || this.props.fullWidth) && {
        flex: 1
      }, this.props.border && {
        borderColor: this.props.border,
        borderWidth: 1
      }, this.props.style, {
        backgroundColor: this.props.color
      }]
    }, this.renderContent()), this.renderExtra());
  }
}
const styles = {
  container: {
    alignItems: "center",
    justifyContent: "center",
    paddingHorizontal: 16,
    height: 28,
    borderRadius: 4,
    alignSelf: "flex-start"
  },
  containerLarge: {
    height: 36
  },
  text: {
    color: "#fff",
    fontFamily: "sf-semibold",
    fontSize: 14,
    paddingBottom: 1
  },
  textLarge: {
    fontSize: 15
  }
};
export { InlineButton };
//# sourceMappingURL=InlineButton.js.map