import type { QuickActionType } from '../../data/mockData';
import { MealRegistrationModal } from './MealRegistrationModal';
import { NoteModal } from './NoteModal';
import { VipAuthModal } from './VipAuthModal';

interface QuickActionModalProps {
  action: QuickActionType;
  noteText: string;
  onNoteChange: (v: string) => void;
  onClose: () => void;
}

export const QuickActionModal = ({
  action,
  noteText,
  onNoteChange,
  onClose,
}: QuickActionModalProps) => {
  if (action === 'none') {
    return null;
  }

  if (action === 'meal') {
    return <MealRegistrationModal onClose={onClose} />;
  }

  if (action === 'note') {
    return <NoteModal noteText={noteText} onNoteChange={onNoteChange} onClose={onClose} />;
  }

  if (action === 'vip') {
    return <VipAuthModal onClose={onClose} />;
  }

  return null;
};


