import React from 'react'; import { AlertCircle, RefreshCw } from 'lucide-react'; import { normalizeCategory } from '../../utils/category'; interface CreatePlanModalProps { show: boolean; code: string; name: string; desc: string; badge: string; heading: string; subtitle: string; type: string; duration: string; priceInr: string; priceUsd: string; priceEur: string; selectedModuleIds: string[]; allModules: any[]; saving: boolean; error: string | null; onCodeChange: (v: string) => void; onNameChange: (v: string) => void; onDescChange: (v: string) => void; onBadgeChange: (v: string) => void; onHeadingChange: (v: string) => void; onSubtitleChange: (v: string) => void; onTypeChange: (v: string) => void; onDurationChange: (v: string) => void; onPriceInrChange: (v: string) => void; onPriceUsdChange: (v: string) => void; onPriceEurChange: (v: string) => void; onToggleModule: (id: string) => void; onSelectAllModules: () => void; onClearAllModules: () => void; onSave: (e: React.FormEvent) => void; onClose: () => void; } export const CreatePlanModal: React.FC = ({ show, code, name, desc, badge, heading, subtitle, type, duration, priceInr, priceUsd, priceEur, selectedModuleIds, allModules, saving, error, onCodeChange, onNameChange, onDescChange, onBadgeChange, onHeadingChange, onSubtitleChange, onTypeChange, onDurationChange, onPriceInrChange, onPriceUsdChange, onPriceEurChange, onToggleModule, onSelectAllModules, onClearAllModules, onSave, onClose, }) => { if (!show) return null; return (

Create Custom Plan / Bundle

Assemble arbitrary modules into a brand-new package.

{error && (
{error}
)}
onCodeChange(e.target.value.toUpperCase().replace(/\s+/g, '_'))} className="w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs font-mono font-bold text-slate-800 focus:outline-none focus:border-indigo-500 uppercase" />
onNameChange(e.target.value)} className="w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs font-semibold text-slate-800 focus:outline-none focus:border-indigo-500" />