import { Toaster } from "@/components/ui/toaster";
import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Index from "./pages/Index";
import About from "./pages/About";
import ServicesPage from "./pages/ServicesPage";
import InfoCenter from "./pages/InfoCenter";
import Newsletters from "./pages/Newsletters";
import FinancialTools from "./pages/FinancialTools";
import FinancialToolsAuto from "./pages/FinancialToolsAuto";
import FinancialToolsBusiness from "./pages/FinancialToolsBusiness";
import FinancialToolsDebt from "./pages/FinancialToolsDebt";
import FinancialToolsInsurance from "./pages/FinancialToolsInsurance";
import FinancialToolsInvestment from "./pages/FinancialToolsInvestment";
import FinancialToolsLoan from "./pages/FinancialToolsLoan";
import FinancialToolsMortgage from "./pages/FinancialToolsMortgage";
import FinancialToolsPersonalFinance from "./pages/FinancialToolsPersonalFinance";
import FinancialToolsRetirement from "./pages/FinancialToolsRetirement";
import FinancialToolsSavings from "./pages/FinancialToolsSavings";
import FinancialToolsTax from "./pages/FinancialToolsTax";
import Links from "./pages/Links";
import Resources from "./pages/Resources";
import TestimonialsPage from "./pages/TestimonialsPage";
import Contact from "./pages/Contact";
import PrivacyPolicy from "./pages/PrivacyPolicy";
import Accessibility from "./pages/Accessibility";
import TaxPreparation from "./pages/services/TaxPreparation";
import AccountingBookkeeping from "./pages/services/AccountingBookkeeping";
import PayrollSolutions from "./pages/services/PayrollSolutions";
import IRSRepresentation from "./pages/services/IRSRepresentation";
import BusinessConsulting from "./pages/services/BusinessConsulting";
import EstatePlanning from "./pages/services/EstatePlanning";
import FinancialPlanning from "./pages/services/FinancialPlanning";
import RetirementPlanning from "./pages/services/RetirementPlanning";
import EstateTrustTax from "./pages/services/EstateTrustTax";
import SalesTax from "./pages/services/SalesTax";
import NotFound from "./pages/NotFound";

const queryClient = new QueryClient();

const App = () => (
  <QueryClientProvider client={queryClient}>
    <TooltipProvider>
      <Toaster />
      <Sonner />
      <BrowserRouter>
        <Routes>
          <Route path="/" element={<Index />} />
          <Route path="/about" element={<About />} />
          <Route path="/services" element={<ServicesPage />} />
          <Route path="/info-center" element={<InfoCenter />} />
          <Route path="/newsletters" element={<Newsletters />} />
          <Route path="/financial-tools" element={<FinancialTools />} />
          <Route path="/financial-tools/auto" element={<FinancialToolsAuto />} />
          <Route path="/financial-tools/business" element={<FinancialToolsBusiness />} />
          <Route path="/financial-tools/debt-credit-cards" element={<FinancialToolsDebt />} />
          <Route path="/financial-tools/insurance" element={<FinancialToolsInsurance />} />
          <Route path="/financial-tools/investment" element={<FinancialToolsInvestment />} />
          <Route path="/financial-tools/loan" element={<FinancialToolsLoan />} />
          <Route path="/financial-tools/mortgage" element={<FinancialToolsMortgage />} />
          <Route path="/financial-tools/personal-finance" element={<FinancialToolsPersonalFinance />} />
          <Route path="/financial-tools/retirement" element={<FinancialToolsRetirement />} />
          <Route path="/financial-tools/savings" element={<FinancialToolsSavings />} />
          <Route path="/financial-tools/tax" element={<FinancialToolsTax />} />
          <Route path="/links" element={<Links />} />
          <Route path="/resources" element={<Resources />} />
          <Route path="/testimonials" element={<TestimonialsPage />} />
          <Route path="/contact" element={<Contact />} />
          <Route path="/privacy-policy" element={<PrivacyPolicy />} />
          <Route path="/accessibility" element={<Accessibility />} />
          <Route path="/services/tax-preparation" element={<TaxPreparation />} />
          <Route path="/services/accounting-bookkeeping" element={<AccountingBookkeeping />} />
          <Route path="/services/payroll-solutions" element={<PayrollSolutions />} />
          <Route path="/services/irs-representation" element={<IRSRepresentation />} />
          <Route path="/services/business-consulting" element={<BusinessConsulting />} />
          <Route path="/services/estate-planning" element={<EstatePlanning />} />
          <Route path="/services/financial-planning" element={<FinancialPlanning />} />
          <Route path="/services/retirement-planning" element={<RetirementPlanning />} />
          <Route path="/services/estate-trust-tax" element={<EstateTrustTax />} />
          <Route path="/services/sales-tax" element={<SalesTax />} />
          {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
          <Route path="*" element={<NotFound />} />
        </Routes>
      </BrowserRouter>
    </TooltipProvider>
  </QueryClientProvider>
);

export default App;
