import { Invoice, PaymentMethod, Subscription } from '../types' export const mockInvoices: Invoice[] = [ { id: 'inv-1', userId: 'user-1', projectId: 'proj-1', description: 'Landing Page Design - Growth Tier', amount: 150, currency: 'EUR', vat: 30, total: 180, status: 'paid', date: new Date('2024-10-01'), dueDate: new Date('2024-10-15'), downloadUrl: '/invoices/inv-1.pdf', }, { id: 'inv-2', userId: 'user-1', projectId: 'proj-2', description: 'Monthly Automation - Growth Tier', amount: 50, currency: 'EUR', vat: 10, total: 60, status: 'paid', date: new Date('2024-09-01'), dueDate: new Date('2024-09-15'), downloadUrl: '/invoices/inv-2.pdf', }, { id: 'inv-3', userId: 'user-1', description: 'Consultation Hour', amount: 75, currency: 'EUR', vat: 15, total: 90, status: 'refunded', date: new Date('2024-07-15'), dueDate: new Date('2024-07-15'), downloadUrl: '/invoices/inv-3.pdf', }, { id: 'inv-4', userId: 'user-1', description: 'AI Chatbot - Starter Tier', amount: 50, currency: 'EUR', vat: 10, total: 60, status: 'pending', date: new Date('2024-10-16'), dueDate: new Date('2024-10-30'), downloadUrl: '/invoices/inv-4.pdf', }, ] export const mockPaymentMethods: PaymentMethod[] = [ { id: 'pm-1', userId: 'user-1', type: 'card', isDefault: true, last4: '4242', brand: 'visa', }, { id: 'pm-2', userId: 'user-1', type: 'paypal', isDefault: false, email: 'alex@bakery.com', }, ] export const mockSubscription: Subscription = { id: 'sub-1', userId: 'user-1', planId: 'growth-ai', status: 'active', currentPeriodStart: new Date('2024-10-01'), currentPeriodEnd: new Date('2024-11-01'), cancelAtPeriodEnd: false, } export function getInvoicesByUserId(userId: string): Invoice[] { return mockInvoices.filter(inv => inv.userId === userId) } export function getInvoiceById(id: string): Invoice | undefined { return mockInvoices.find(inv => inv.id === id) } export function getPaymentMethodsByUserId(userId: string): PaymentMethod[] { return mockPaymentMethods.filter(pm => pm.userId === userId) } export function getDefaultPaymentMethod(userId: string): PaymentMethod | undefined { return mockPaymentMethods.find(pm => pm.userId === userId && pm.isDefault) }