"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.OpenIDCredentialRowCard = OpenIDCredentialRowCard;
var _reactNative = require("react-native");
var _reactNativeGestureHandler = require("react-native-gesture-handler");
var _theme = require("../../../contexts/theme");
function OpenIDCredentialRowCard({
  name,
  issuer,
  bgColor,
  onPress
}) {
  const {
    TextTheme
  } = (0, _theme.useTheme)();
  const {
    width
  } = (0, _reactNative.useWindowDimensions)();
  const style = _reactNative.StyleSheet.create({
    container: {},
    rowContainer: {
      flexDirection: 'row',
      borderRadius: 8,
      backgroundColor: '#202020',
      padding: 5,
      minHeight: 0.2 * width
    },
    issuerBadge: {
      borderRadius: 8,
      width: '30%',
      backgroundColor: 'red',
      marginRight: 10
    },
    infoContainer: {
      flex: 1,
      justifyContent: 'space-between'
    }
  });
  //
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    style: style.container
  }, /*#__PURE__*/React.createElement(_reactNativeGestureHandler.TouchableOpacity, {
    onPress: onPress,
    style: style.rowContainer
  }, /*#__PURE__*/React.createElement(_reactNative.View, {
    style: [style.issuerBadge, bgColor ? {
      backgroundColor: bgColor
    } : {}]
  }), /*#__PURE__*/React.createElement(_reactNative.View, {
    style: [style.infoContainer, issuer ? {
      justifyContent: 'center'
    } : {}]
  }, /*#__PURE__*/React.createElement(_reactNative.Text, {
    style: TextTheme.title
  }, name), issuer && /*#__PURE__*/React.createElement(_reactNative.Text, {
    style: TextTheme.labelSubtitle
  }, issuer))));
}
//# sourceMappingURL=CredentialRowCard.js.map