import { BrandingOverlayType } from '@hyperledger/aries-oca/build/legacy';
import { Image, StyleSheet, useWindowDimensions, View } from 'react-native';
import { toImageSource } from '../../utils/credential';
import { useTheme } from '../../contexts/theme';
import { testIdWithKey } from '../../utils/testable';
import { ThemedText } from '../texts/ThemedText';
const CredentialCard11Logo = ({
  noLogoText,
  overlay,
  overlayType,
  elevated
}) => {
  var _overlay$brandingOver, _overlay$brandingOver2;
  const {
    CredentialCardShadowTheme
  } = useTheme();
  const {
    width
  } = useWindowDimensions();
  const padding = width * 0.05;
  const logoHeight = width * 0.12;
  const styles = StyleSheet.create({
    logoContainer: {
      width: logoHeight,
      height: logoHeight,
      backgroundColor: '#ffffff',
      borderRadius: 8,
      justifyContent: 'center',
      alignItems: 'center',
      ...(overlayType === BrandingOverlayType.Branding10 && {
        top: padding,
        left: -1 * logoHeight + padding,
        ...CredentialCardShadowTheme
      })
    }
  });
  return /*#__PURE__*/React.createElement(View, {
    style: [styles.logoContainer, {
      elevation: elevated ? 5 : 0
    }]
  }, (_overlay$brandingOver = overlay.brandingOverlay) !== null && _overlay$brandingOver !== void 0 && _overlay$brandingOver.logo ? /*#__PURE__*/React.createElement(Image, {
    source: toImageSource((_overlay$brandingOver2 = overlay.brandingOverlay) === null || _overlay$brandingOver2 === void 0 ? void 0 : _overlay$brandingOver2.logo),
    style: {
      resizeMode: 'cover',
      width: logoHeight,
      height: logoHeight,
      borderRadius: 8
    },
    testID: testIdWithKey('Logo')
  }) : /*#__PURE__*/React.createElement(ThemedText, {
    variant: "bold",
    style: {
      fontSize: 0.5 * logoHeight,
      alignSelf: 'center',
      color: '#000'
    },
    testID: testIdWithKey('NoLogoText')
  }, noLogoText.charAt(0).toUpperCase()));
};
export default CredentialCard11Logo;
//# sourceMappingURL=CredentialCard11Logo.js.map