import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cn } from '../../../scalars/lib/utils.js';
import { getTextAlignmentClasses } from './utils.js';
import countries, {} from 'world-countries';
import { useMemo } from 'react';
import { CircleFlag } from 'react-circle-flags';
const RenderCountryCell = (value, context) => {
    const countryValue = useMemo(() => countries.find((country) => country.cca2 === value), [value]);
    return (_jsxs("div", { className: cn('flex items-center gap-2', getTextAlignmentClasses(context)), children: [countryValue && _jsx(CircleFlag, { className: "size-4", countryCode: countryValue.cca2.toLowerCase(), height: 16 }), countryValue?.name.common ?? ''] }));
};
export { RenderCountryCell as renderCountryCell };
//# sourceMappingURL=country-render.js.map