import type { CountryCode } from '@gruperly/shared' import { COUNTRY_CURRENCY } from '@gruperly/shared' import { ArrowLeft, ArrowRight } from 'lucide-react' import { Button } from '../../components/ui' import { cn } from '../../lib/utils' import { useOnboarding } from './OnboardingProvider' import { useTranslation } from 'react-i18next' import { countryName, useIntlLocale } from '../../i18n' export const COUNTRY_OPTIONS: readonly CountryCode[] = [ 'AR', 'BR', 'CL', 'CO', 'MX', 'PE', 'UY', ] type CountryStepProps = { onNext: () => void onBack: () => void } /** * Paso "País" del onboarding. * * El país del profesor define la moneda con la que se generan los links de * cobro y el precio de Pro, así que se pregunta al empezar. Por default * Argentina (la moneda por default es ARS). Vive en el provider: el paso Plan y * el del primer grupo lo usan, y se guarda junto con el plan. */ export function CountryStep({ onNext, onBack }: CountryStepProps) { const { country, setCountry } = useOnboarding() const { t } = useTranslation(['onboarding', 'common', 'groups']) const locale = useIntlLocale() return (

{t('country.title')}

{t('country.description')}

{COUNTRY_OPTIONS.map((code) => { const isSelected = code === country return ( ) })}
) }