import { cn } from '@/lib/utils'; import type { PlanWithFeatures } from '@repo/api-contract'; import { Check, X } from 'lucide-react'; import type { UseFormReturn } from 'react-hook-form'; type PlanSelectStepProps = { form: UseFormReturn; plans: PlanWithFeatures[]; }; const FEATURE_LABELS: Record = { publicBookingPage: 'Página de booking pública', onlinePayments: 'Pagos online', advancedReports: 'Reportes avanzados', whatsappReminders: 'Recordatorios WhatsApp', }; export function PlanSelectStep({ form, plans }: PlanSelectStepProps) { const selectedCode = form.watch('planCode') as string | undefined; const errors = form.formState.errors; const featuresList = [ 'publicBookingPage', 'onlinePayments', 'advancedReports', 'whatsappReminders', ] as const; return (

Elegí tu plan

Seleccioná el plan que mejor se adapte a tu complejo.

{plans.map((plan) => { const isSelected = selectedCode === plan.code; return ( ); })}
{errors.planCode && (

{String(errors.planCode.message ?? '')}

)}
); }