import ReactCountryFlag from "react-country-flag";

const CountryFlag = ({ code, size = "20px", round = false }) => {
  return (
    <ReactCountryFlag
      countryCode={code ?? "GB"}
      svg
      style={{
        width: size,
        height: size,
        marginRight: "8px",
        borderRadius: round ? "50%" : "0",
        objectFit: "cover",
      }}
    />
  );
};

export { CountryFlag };
