export interface Template {
  id: string
  name: string
  description: string
  color: string
  content: string
}

export const TEMPLATES: Template[] = [
  {
    id: 'budget',
    name: 'Budget',
    description: 'Monthly income and expenses',
    color: '#10b981',
    content: `# Monthly Budget

// Income
salary = 5000
freelance = 1200
total_income = salary + freelance

// Housing
rent = 1500
utilities = 150
insurance = 80

// Living
groceries = 400
transport = 120
subscriptions = 45

// Summary
total_expenses = sum
savings = total_income - total_expenses
savings_rate = savings / total_income
`,
  },
  {
    id: 'invoice',
    name: 'Invoice',
    description: 'Service invoice with tax',
    color: '#6366f1',
    content: `# Invoice #001

// Client: [Client Name]
// Date: [Date]

// Services
web_design = 2500
development = 4000
consulting = 150 * 8

// Expenses
hosting = 29.99
domain = 12.00

subtotal = sum

// Tax
tax_rate = 10%
tax = subtotal * tax_rate
total = subtotal + tax
`,
  },
  {
    id: 'units',
    name: 'Unit Converter',
    description: 'Common unit conversions',
    color: '#0d9488',
    content: `# Unit Converter

// Weight
75 kg in lb
2.5 lb in kg
100 g in oz

// Distance
10 km in mi
26.2 mi in km
5280 ft in m

// Temperature
100 °C in °F
72 °F in °C
0 °C in K

// Data
1 GB in MB
500 MB in GB
1 TB in GB
`,
  },
  {
    id: 'trip',
    name: 'Trip Planner',
    description: 'Travel budget with currencies',
    color: '#f59e0b',
    content: `# Trip Planner

// Budget
budget = 3000

// Flights
flight_out = 450
flight_back = 380

// Hotel
nights = 7
rate_per_night = 120
hotel_total = nights * rate_per_night

// Daily expenses
daily_food = 50
daily_transport = 20
daily_activities = 35
daily_total = daily_food + daily_transport + daily_activities
trip_expenses = daily_total * nights

// Summary
total_cost = flight_out + flight_back + hotel_total + trip_expenses
remaining = budget - total_cost
`,
  },
  {
    id: 'loan',
    name: 'Loan Calculator',
    description: 'Mortgage and loan payments',
    color: '#7c3aed',
    content: `# Loan Calculator

// Loan Details
principal = 250000
annual_rate = 6.5%
years = 30

// Monthly Calculation
monthly_rate = annual_rate / 12
num_payments = years * 12

// Monthly Payment
monthly_payment = principal * (monthly_rate * (1 + monthly_rate) ^ num_payments) / ((1 + monthly_rate) ^ num_payments - 1)

// Total Cost
total_paid = monthly_payment * num_payments
total_interest = total_paid - principal

// Summary
interest_ratio = total_interest / principal
`,
  },
]
