import React from 'react';
import { Routes, Route } from 'react-router-dom';
import LandingPage from './LandingPage';
import ContactPage from './ContactPage';
import EditPage from './EditPage';
import CloneChatPage from './CloneChatPage';
import type { ContactData } from './types';

interface AppRoutesProps {
  contactData: ContactData;
  onSave: (data: ContactData) => void;
}

const AppRoutes: React.FC<AppRoutesProps> = ({ contactData, onSave }) => {
  return (
    <Routes>
      <Route path="/" element={<LandingPage />} />
      <Route path="/contact" element={<ContactPage data={contactData} />} />
      <Route path="/edit" element={<EditPage initialData={contactData} onSave={onSave} />} />
      <Route path="/clone-chat" element={<CloneChatPage />} />
    </Routes>
  );
};

export default AppRoutes;
