1→import SwiftUI 2→ 3→// MARK: - Debt Status 4→enum DebtStatus: String, Codable, CaseIterable { 5→ case overdue = "Vencida" 6→ case pending = "Pendente" 7→ case paid = "Paga" 8→ 9→ var color: Color { 10→ switch self { 11→ case .overdue: return .red 12→ case .pending: return .orange 13→ case .paid: return .green 14→ } 15→ } 16→ 17→ var icon: String { 18→ switch self { 19→ case .overdue: return "exclamationmark.circle.fill" 20→ case .pending: return "clock.fill" 21→ case .paid: return "checkmark.circle.fill" 22→ } 23→ } 24→} 25→ 26→// MARK: - Transaction Type 27→enum TransactionType: String, Codable, CaseIterable { 28→ case income = "Receita" 29→ case expense = "Despesa" 30→ 31→ var color: Color { 32→ switch self { 33→ case .income: return .green 34→ case .expense: return .red 35→ } 36→ } 37→ 38→ var icon: String { 39→ switch self { 40→ case .income: return "arrow.down.circle.fill" 41→ case .expense: return "arrow.up.circle.fill" 42→ } 43→ } 44→} 45→ 46→// MARK: - Expense Category 47→enum ExpenseCategory: String, Codable, CaseIterable { 48→ // Essential 49→ case housing = "Moradia" 50→ case food = "Alimentacao" 51→ case utilities = "Contas" 52→ case transportation = "Transporte" 53→ case health = "Saude" 54→ case insurance = "Seguro" 55→ 56→ // Lifestyle 57→ case entertainment = "Lazer" 58→ case shopping = "Compras" 59→ case personalCare = "Cuidados Pessoais" 60→ case restaurants = "Restaurantes" 61→ case travel = "Viagens" 62→ 63→ // Development 64→ case education = "Educacao" 65→ case software = "Software/IA" 66→ case subscriptions = "Assinaturas" 67→ 68→ // Social 69→ case family = "Familia" 70→ case pets = "Pets" 71→ case gifts = "Presentes" 72→ case donations = "Doacoes" 73→ 74→ // Financial 75→ case taxes = "Impostos" 76→ case fees = "Taxas" 77→ case debt = "Dividas" 78→ 79→ // Other 80→ case other = "Outros" 81→ 82→ var icon: String { 83→ switch self { 84→ case .housing: return "house.fill" 85→ case .food: return "cart.fill" 86→ case .utilities: return "bolt.fill" 87→ case .transportation: return "car.fill" 88→ case .health: return "heart.fill" 89→ case .insurance: return "shield.fill" 90→ case .entertainment: return "gamecontroller.fill" 91→ case .shopping: return "bag.fill" 92→ case .personalCare: return "sparkles" 93→ case .restaurants: return "fork.knife" 94→ case .travel: return "airplane" 95→ case .education: return "graduationcap.fill" 96→ case .software: return "cpu.fill" 97→ case .subscriptions: return "repeat.circle.fill" 98→ case .family: return "figure.2.and.child.holdinghands" 99→ case .pets: return "pawprint.fill" 100→ case .gifts: return "gift.fill" 101→ case .donations: return "heart.circle.fill" 102→ case .taxes: return "doc.text.fill" 103→ case .fees: return "percent" 104→ case .debt: return "creditcard.fill" 105→ case .other: return "ellipsis.circle.fill" 106→ } 107→ } 108→ 109→ var color: Color { 110→ switch self { 111→ case .housing: return .blue 112→ case .food: return .orange 113→ case .utilities: return .yellow 114→ case .transportation: return .purple 115→ case .health: return .red 116→ case .insurance: return .teal 117→ case .entertainment: return .pink 118→ case .shopping: return .indigo 119→ case .personalCare: return .mint 120→ case .restaurants: return .orange 121→ case .travel: return .cyan 122→ case .education: return .blue 123→ case .software: return .purple 124→ case .subscriptions: return .indigo 125→ case .family: return .green 126→ case .pets: return .brown 127→ case .gifts: return .pink 128→ case .donations: return .red 129→ case .taxes: return .gray 130→ case .fees: return .gray 131→ case .debt: return .red 132→ case .other: return .secondary 133→ } 134→ } 135→ 136→ var emoji: String { 137→ switch self { 138→ case .housing: return "🏠" 139→ case .food: return "🛒" 140→ case .utilities: return "💡" 141→ case .transportation: return "🚗" 142→ case .health: return "💊" 143→ case .insurance: return "🛡️" 144→ case .entertainment: return "🎮" 145→ case .shopping: return "🛍️" 146→ case .personalCare: return "✨" 147→ case .restaurants: return "🍽️" 148→ case .travel: return "✈️" 149→ case .education: return "📚" 150→ case .software: return "💻" 151→ case .subscriptions: return "🔄" 152→ case .family: return "👨‍👩‍👧" 153→ case .pets: return "🐾" 154→ case .gifts: return "🎁" 155→ case .donations: return "❤️" 156→ case .taxes: return "📋" 157→ case .fees: return "💸" 158→ case .debt: return "💳" 159→ case .other: return "📦" 160→ } 161→ } 162→ 163→ static var essentials: [ExpenseCategory] { 164→ [.housing, .food, .utilities, .transportation, .health, .insurance] 165→ } 166→ 167→ static var lifestyle: [ExpenseCategory] { 168→ [.entertainment, .shopping, .personalCare, .restaurants, .travel] 169→ } 170→ 171→ static var development: [ExpenseCategory] { 172→ [.education, .software, .subscriptions] 173→ } 174→ 175→ static var social: [ExpenseCategory] { 176→ [.family, .pets, .gifts, .donations] 177→ } 178→ 179→ static var financial: [ExpenseCategory] { 180→ [.taxes, .fees, .debt] 181→ } 182→} 183→ 184→// MARK: - Income Category 185→enum IncomeCategory: String, Codable, CaseIterable { 186→ // Work 187→ case salary = "Salario" 188→ case freelance = "Freelance" 189→ case contract = "Contrato PJ" 190→ case bonus = "Bonus" 191→ case commission = "Comissao" 192→ 193→ // Passive 194→ case investment = "Investimento" 195→ case dividends = "Dividendos" 196→ case rental = "Aluguel" 197→ case royalties = "Royalties" 198→ 199→ // Benefits 200→ case benefit = "Beneficio" 201→ case pension = "Aposentadoria" 202→ case refund = "Reembolso" 203→ 204→ // Other 205→ case gift = "Presente" 206→ case sale = "Venda" 207→ case loan = "Emprestimo" 208→ case other = "Outros" 209→ 210→ var icon: String { 211→ switch self { 212→ case .salary: return "banknote.fill" 213→ case .freelance: return "laptopcomputer" 214→ case .contract: return "doc.text.fill" 215→ case .bonus: return "star.fill" 216→ case .commission: return "percent" 217→ case .investment: return "chart.line.uptrend.xyaxis" 218→ case .dividends: return "chart.pie.fill" 219→ case .rental: return "building.2.fill" 220→ case .royalties: return "music.note" 221→ case .benefit: return "hand.raised.fill" 222→ case .pension: return "figure.walk" 223→ case .refund: return "arrow.uturn.backward.circle.fill" 224→ case .gift: return "gift.fill" 225→ case .sale: return "tag.fill" 226→ case .loan: return "creditcard.fill" 227→ case .other: return "ellipsis.circle.fill" 228→ } 229→ } 230→ 231→ var color: Color { 232→ switch self { 233→ case .salary: return .green 234→ case .freelance: return .blue 235→ case .contract: return .purple 236→ case .bonus: return .yellow 237→ case .commission: return .orange 238→ case .investment: return .teal 239→ case .dividends: return .mint 240→ case .rental: return .indigo 241→ case .royalties: return .pink 242→ case .benefit: return .cyan 243→ case .pension: return .blue 244→ case .refund: return .green 245→ case .gift: return .pink 246→ case .sale: return .orange 247→ case .loan: return .red 248→ case .other: return .secondary 249→ } 250→ } 251→ 252→ var emoji: String { 253→ switch self { 254→ case .salary: return "💵" 255→ case .freelance: return "💻" 256→ case .contract: return "📄" 257→ case .bonus: return "⭐" 258→ case .commission: return "💰" 259→ case .investment: return "📈" 260→ case .dividends: return "🥧" 261→ case .rental: return "🏢" 262→ case .royalties: return "🎵" 263→ case .benefit: return "🤝" 264→ case .pension: return "👴" 265→ case .refund: return "↩️" 266→ case .gift: return "🎁" 267→ case .sale: return "🏷️" 268→ case .loan: return "🏦" 269→ case .other: return "📦" 270→ } 271→ } 272→ 273→ static var work: [IncomeCategory] { 274→ [.salary, .freelance, .contract, .bonus, .commission] 275→ } 276→ 277→ static var passive: [IncomeCategory] { 278→ [.investment, .dividends, .rental, .royalties] 279→ } 280→ 281→ static var benefits: [IncomeCategory] { 282→ [.benefit, .pension, .refund] 283→ } 284→} 285→ 286→// MARK: - Sidebar Item 287→enum SidebarItem: String, CaseIterable, Identifiable { 288→ case dashboard = "Dashboard" 289→ case calendar = "Calendario" 290→ case budget = "Orcamento" 291→ case debts = "Dividas" 292→ case debtPriority = "Prioridade" 293→ case negotiation = "Negociacao" 294→ case payoffPlan = "Plano Quitacao" 295→ case cashFlow = "Fluxo Caixa" 296→ case simulator = "Simulador" 297→ case aiPlanner = "Plano IA" 298→ case reports = "Relatorios" 299→ case weeklyReport = "Relatorio Semanal" 300→ case monthlyComparison = "Comparacao" 301→ case export = "Exportar PDF" 302→ case projections = "Projecoes" 303→ case goals = "Metas" 304→ case emergencyFund = "Reserva" 305→ case income = "Receitas" 306→ case expenses = "Despesas" 307→ case backup = "Backup" 308→ case settings = "Configuracoes" 309→ 310→ var id: String { rawValue } 311→ 312→ var icon: String { 313→ switch self { 314→ case .dashboard: return "chart.pie.fill" 315→ case .calendar: return "calendar" 316→ case .budget: return "chart.bar.fill" 317→ case .debts: return "creditcard.fill" 318→ case .debtPriority: return "list.number" 319→ case .negotiation: return "person.2.fill" 320→ case .payoffPlan: return "checkmark.circle.badge.questionmark" 321→ case .cashFlow: return "chart.line.uptrend.xyaxis" 322→ case .simulator: return "dollarsign.arrow.circlepath" 323→ case .aiPlanner: return "brain.head.profile" 324→ case .reports: return "doc.text.fill" 325→ case .weeklyReport: return "calendar.badge.clock" 326→ case .monthlyComparison: return "arrow.left.arrow.right.circle.fill" 327→ case .export: return "square.and.arrow.up" 328→ case .projections: return "chart.line.uptrend.xyaxis" 329→ case .goals: return "target" 330→ case .emergencyFund: return "shield.fill" 331→ case .income: return "arrow.down.circle.fill" 332→ case .expenses: return "arrow.up.circle.fill" 333→ case .backup: return "externaldrive.fill" 334→ case .settings: return "gearshape.fill" 335→ } 336→ } 337→} 338→ Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.