import styled from "@emotion/styled";
import { jsx } from "@emotion/react/jsx-runtime";
//#region src/components/CountryFlag/CountryFlagImg.tsx
function CountryFlagImg({ countryCode, height = 32, flagUrls, placeholderUrl }) {
	const imgSrc = flagUrls[countryCode.toLowerCase()];
	if (!imgSrc && !placeholderUrl) return /* @__PURE__ */ jsx(Placeholder, { style: {
		width: height,
		height
	} });
	return /* @__PURE__ */ jsx(StyledCountryFlagImg, {
		alt: `${countryCode} country flag`,
		src: imgSrc || placeholderUrl,
		height
	});
}
const StyledCountryFlagImg = styled.img`
  border-radius: 999px;
`;
const Placeholder = styled.div`
  border-radius: 999px;
  background: #e0e0e0;
`;
//#endregion
export { CountryFlagImg };
