"use client"; import React, { useState, useEffect } from 'react'; import { Search, Moon, Sun, Calculator, TrendingUp, DollarSign, Clock, Percent, ShoppingCart, Youtube, Briefcase, RotateCcw, Copy, Download, Share2, Printer, ChevronRight, ArrowUpRight, Info, CheckCircle2, Menu, X } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; import jsPDF from 'jspdf'; // --- Types --- type CalcType = 'freelance' | 'payraise' | 'overtime' | 'commission' | 'priceincrease' | 'discount' | 'tipsplit' | 'subscription' | 'roi' | 'youtube'; // --- Main Component --- export default function CalcMasterUSA() { const [activeTab, setActiveTab] = useState('freelance'); const [isDarkMode, setIsDarkMode] = useState(false); const [searchQuery, setSearchQuery] = useState(''); const [isSidebarOpen, setIsSidebarOpen] = useState(false); // --- Theme Toggle --- useEffect(() => { if (isDarkMode) document.documentElement.classList.add('dark'); else document.documentElement.classList.remove('dark'); }, [isDarkMode]); return (
{/* --- HEADER (Glassmorphism) --- */}
C
CalcMaster USA
setSearchQuery(e.target.value)} />
{/* --- SIDEBAR (Desktop) --- */} {/* --- MAIN CONTENT --- */}
{/* Featured Content Below Calculator */}
{/* --- FOOTER --- */}
); } // --- Sidebar Item Component --- function SidebarItem({ icon, label, active, onClick }: { icon: any, label: string, active: boolean, onClick: any }) { return ( ); } // --- CALCULATOR ENGINE --- function CalculatorEngine({ type }: { type: CalcType }) { const [val1, setVal1] = useState(5000); const [val2, setVal2] = useState(20); const [result, setResult] = useState(0); // Logic switcher const calculate = () => { switch(type) { case 'freelance': setResult((val1 + 15000) / (48 * val2)); break; case 'payraise': setResult((val1 * (val2 / 100))); break; case 'overtime': setResult((val1 * 40) + (val1 * 1.5 * val2)); break; case 'youtube': setResult((val1 / 1000) * val2); break; default: setResult(val1 + val2); } }; useEffect(() => calculate(), [val1, val2, type]); const copyResult = () => { navigator.clipboard.writeText(result.toFixed(2)); alert("Copied!"); }; return (

{type.replace(/([A-Z])/g, ' $1')} Calculator

Professional financial estimation for USA users.

{/* Inputs Section */}
setVal1(Number(e.target.value))} />
setVal2(Number(e.target.value))} />
Min: 1 {val2} Max: 100
{/* Results Section */}

Estimated Result

${result.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2})}

This calculation is based on current 2026 USA economic data and standard financial formulas.

{/* Bottom Info Bar */}
{[1,2,3].map(i =>
)}

Used by over 10,000+ professionals this month across the USA.

); } // --- Support Components --- function ArticleCard({ title, category }: { title: string, category: string }) { return (
{category}

{title}

); } function FAQSection() { return (

Frequently Asked Questions

{[1,2,3,4].map(i => (

How accurate is the {i === 1 ? 'Freelance' : 'Tax'} calculation?

Our algorithms are updated quarterly to reflect current USA inflation rates and federal tax guidelines for 2026.

))}
); } function Footer() { return ( ); }