// Invoice template export const templates: Record) => string> = { invoice: (data) => `

${data.companyName || 'Company Name'}

${data.companyAddress || ''}
${data.companyCity || ''}, ${data.companyState || ''} ${data.companyZip || ''}
${data.companyPhone || ''}

INVOICE
#${data.invoiceNumber || 'INV-001'}

Date: ${data.invoiceDate || new Date().toLocaleDateString()}
Due: ${data.dueDate || ''}

Bill To:

${data.clientName || 'Client Name'}
${data.clientAddress || ''}
${data.clientCity || ''}, ${data.clientState || ''} ${data.clientZip || ''}

Payment Details:

Terms: ${data.paymentTerms || 'Net 30'}
Method: ${data.paymentMethod || 'Bank Transfer'}

${data.items || ''}
Description Qty Rate Amount
Service1$0$0
Subtotal:${data.subtotal || '$0'}
Tax (${data.taxRate || '0'}%):${data.tax || '$0'}
Total:${data.total || '$0'}
${data.notes ? `
Notes:
${data.notes}
` : ''} `, report: (data) => `
${data.title || 'Report Title'}
${data.subtitle || ''}

Date: ${data.reportDate || new Date().toLocaleDateString()}

Author: ${data.author || ''}

Executive Summary

${data.executiveSummary || ''}

${data.section1Title || 'Introduction'}

${data.section1Content || ''}

${data.section2Title || 'Analysis'}

${data.section2Content || ''}

Conclusion

${data.conclusion || ''}

`, resume: (data) => `
${data.name || 'Your Name'}
${data.email || ''} | ${data.phone || ''} | ${data.location || ''}
${data.linkedin ? `${data.linkedin}` : ''} ${data.website ? `| ${data.website}` : ''}

Professional Summary

${data.summary || ''}

Experience

${data.experience || '
Position at Company
'}

Education

${data.education || '
Degree - Institution
'}

Skills

${data.skills || 'Skill'}
`, letter: (data) => `
${data.senderName || ''}
${data.senderAddress || ''}
${data.senderCity || ''}, ${data.senderState || ''} ${data.senderZip || ''}
${data.date || new Date().toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}
${data.recipientName || ''}
${data.recipientTitle ? data.recipientTitle + '
' : ''} ${data.recipientCompany ? data.recipientCompany + '
' : ''} ${data.recipientAddress || ''}
${data.recipientCity || ''}, ${data.recipientState || ''} ${data.recipientZip || ''}

Dear ${data.recipientName || 'Sir/Madam'},

${data.body || ''}

${data.closing || 'Sincerely'},
${data.senderName || ''}
`, contract: (data) => `
${data.contractTitle || 'SERVICE AGREEMENT'}
Effective Date: ${data.effectiveDate || new Date().toLocaleDateString()}

This Agreement is entered into by and between:

${data.party1Name || 'Party 1'} ("${data.party1Label || 'Provider'}")
Address: ${data.party1Address || ''}

AND

${data.party2Name || 'Party 2'} ("${data.party2Label || 'Client'}")
Address: ${data.party2Address || ''}

1. PURPOSE

${data.purpose || ''}

2. TERM

This Agreement shall be effective for a period of ${data.term || '12 months'} from the Effective Date.

3. OBLIGATIONS

${data.obligations || ''}

4. COMPENSATION

${data.compensation || ''}

5. TERMINATION

${data.termination || ''}

6. GOVERNING LAW

This Agreement shall be governed by the laws of ${data.governingLaw || 'the applicable jurisdiction'}.

${data.party1Name || 'Party 1'}
${data.party1Label || 'Provider'}
${data.party2Name || 'Party 2'}
${data.party2Label || 'Client'}
` };