/** @format */ /** * External dependencies */ import ReactFlag from 'react-world-flags'; import classnames from 'classnames'; import PropTypes from 'prop-types'; /** * Internal dependencies */ import './style.scss'; /** * Use the `Flag` component to display a country's flag. * * @return { object } - */ const Flag = ( { code, order, round, height, width, className } ) => { const classes = classnames( 'woocommerce-flag', className, { 'is-round': round, } ); let _code = code || 'unknown'; if ( order && order.shipping ) { _code = order.shipping.country; } else if ( order && order.billing && order.billing.country ) { _code = order.billing.country; } const _height = round ? height * 2 : height; const _width = round ? width * 2 : width; const inlineStyles = round ? { height, width } : {}; return (