export function socialMediaManagementCalculator(form: FormTs) {
form.addRow(row => {
row.addTextPanel('header', {
computedValue: () => 'Social Media Management Pricing',
customStyles: { 'font-size': '1.5rem', 'font-weight': '600', 'color': '#1e293b' }
});
});
form.addSpacer({ height: 20 });
// Business Info Section
const businessSection = form.addSubform('business', { title: '🏢 Business Details' });
businessSection.addRow(row => {
row.addDropdown('businessSize', {
label: 'Business Size',
options: [
{ id: 'solo', name: 'Solo/Freelancer' },
{ id: 'small', name: 'Small Business (2-10 employees)' },
{ id: 'medium', name: 'Medium Business (11-50 employees)' },
{ id: 'large', name: 'Large Business (50+ employees)' }
],
defaultValue: 'small',
isRequired: true
}, '1fr');
row.addDropdown('industry', {
label: 'Industry',
options: [
{ id: 'retail', name: 'Retail/E-commerce' },
{ id: 'restaurant', name: 'Restaurant/Food' },
{ id: 'health', name: 'Health & Wellness' },
{ id: 'professional', name: 'Professional Services' },
{ id: 'tech', name: 'Technology' },
{ id: 'real-estate', name: 'Real Estate' },
{ id: 'fitness', name: 'Fitness/Sports' },
{ id: 'beauty', name: 'Beauty/Fashion' },
{ id: 'other', name: 'Other' }
],
defaultValue: 'retail'
}, '1fr');
});
// Platforms Section
const platformsSection = form.addSubform('platforms', { title: '📱 Social Platforms' });
platformsSection.addRow(row => {
row.addCheckbox('facebook', {
label: 'Facebook (+$200/mo)',
defaultValue: true
}, '1fr');
row.addCheckbox('instagram', {
label: 'Instagram (+$250/mo)',
defaultValue: true
}, '1fr');
});
platformsSection.addRow(row => {
row.addCheckbox('twitter', {
label: 'X/Twitter (+$150/mo)',
defaultValue: false
}, '1fr');
row.addCheckbox('linkedin', {
label: 'LinkedIn (+$200/mo)',
defaultValue: false
}, '1fr');
});
platformsSection.addRow(row => {
row.addCheckbox('tiktok', {
label: 'TikTok (+$350/mo)',
defaultValue: false
}, '1fr');
row.addCheckbox('pinterest', {
label: 'Pinterest (+$150/mo)',
defaultValue: false
}, '1fr');
});
platformsSection.addRow(row => {
row.addCheckbox('youtube', {
label: 'YouTube (+$400/mo)',
defaultValue: false
}, '1fr');
row.addCheckbox('threads', {
label: 'Threads (+$100/mo)',
defaultValue: false
}, '1fr');
});
// Posting Frequency Section
const frequencySection = form.addSubform('frequency', { title: '📅 Posting Frequency' });
frequencySection.addRow(row => {
row.addRadioButton('postingFrequency', {
label: 'Posts per Platform per Week',
options: [
{ id: '3', name: '3 posts/week (Basic)' },
{ id: '5', name: '5 posts/week (Standard)' },
{ id: '7', name: 'Daily posting (Premium)' },
{ id: '14', name: 'Twice daily (Enterprise)' }
],
defaultValue: '5',
isRequired: true
});
});
frequencySection.addRow(row => {
row.addCheckbox('includeStories', {
label: 'Include Stories/Reels (5/week per platform)',
defaultValue: false,
tooltip: 'Adds $150/month per platform with stories'
}, '1fr');
row.addCheckbox('includeReels', {
label: 'Video Reels Production (2/week)',
defaultValue: false,
tooltip: 'Professional short-form video content +$300/month'
}, '1fr');
});
// Services Section
const servicesSection = form.addSubform('services', { title: '✨ Additional Services' });
servicesSection.addRow(row => {
row.addCheckbox('contentCreation', {
label: 'Custom Graphics & Content Creation (+$200/mo)',
defaultValue: true
}, '1fr');
row.addCheckbox('copywriting', {
label: 'Professional Copywriting (+$150/mo)',
defaultValue: true
}, '1fr');
});
servicesSection.addRow(row => {
row.addCheckbox('communityManagement', {
label: 'Community Management (+$250/mo)',
defaultValue: false,
tooltip: 'Responding to comments, DMs, and engaging with followers'
}, '1fr');
row.addCheckbox('influencerOutreach', {
label: 'Influencer Outreach (+$300/mo)',
defaultValue: false
}, '1fr');
});
servicesSection.addRow(row => {
row.addCheckbox('analytics', {
label: 'Monthly Analytics Reports (+$100/mo)',
defaultValue: true
}, '1fr');
row.addCheckbox('adManagement', {
label: 'Paid Ads Management (+$400/mo)',
defaultValue: false,
tooltip: 'Does not include ad spend budget'
}, '1fr');
});
servicesSection.addRow(row => {
row.addCheckbox('contentCalendar', {
label: 'Content Calendar Planning (+$100/mo)',
defaultValue: false
}, '1fr');
row.addCheckbox('brandStrategy', {
label: 'Brand Strategy Consultation (+$200/mo)',
defaultValue: false
}, '1fr');
});
// Contract Terms Section
const contractSection = form.addSubform('contract', { title: '📋 Contract Terms' });
contractSection.addRow(row => {
row.addDropdown('contractLength', {
label: 'Contract Length',
options: [
{ id: '1', name: 'Month-to-Month' },
{ id: '3', name: '3 Months (5% discount)' },
{ id: '6', name: '6 Months (10% discount)' },
{ id: '12', name: '12 Months (15% discount)' }
],
defaultValue: '3'
}, '1fr');
row.addDropdown('setupFee', {
label: 'Setup & Onboarding',
options: [
{ id: 'basic', name: 'Basic Setup ($299)' },
{ id: 'standard', name: 'Standard Setup ($499)' },
{ id: 'premium', name: 'Premium Setup ($999)' },
{ id: 'waived', name: 'Waived (12-mo contract)' }
],
defaultValue: 'standard',
tooltip: 'Includes account setup, brand guidelines, and initial content strategy'
}, '1fr');
});
form.addSpacer({ height: 20, showLine: true, lineStyle: 'dashed' });
// Cost Breakdown Section
const breakdownSection = form.addSubform('breakdown', { title: '📊 Cost Breakdown', isCollapsible: true });
breakdownSection.addRow(row => {
row.addPriceDisplay('platformCost', {
label: 'Platform Management',
computedValue: () => {
let total = 0;
if (platformsSection.checkbox('facebook')?.value()) total += 200;
if (platformsSection.checkbox('instagram')?.value()) total += 250;
if (platformsSection.checkbox('twitter')?.value()) total += 150;
if (platformsSection.checkbox('linkedin')?.value()) total += 200;
if (platformsSection.checkbox('tiktok')?.value()) total += 350;
if (platformsSection.checkbox('pinterest')?.value()) total += 150;
if (platformsSection.checkbox('youtube')?.value()) total += 400;
if (platformsSection.checkbox('threads')?.value()) total += 100;
return total;
},
variant: 'default'
}, '1fr');
row.addPriceDisplay('frequencyCost', {
label: 'Posting Frequency',
computedValue: () => {
const frequency = frequencySection.radioButton('postingFrequency')?.value() || '5';
const frequencyMultipliers: Record<string, number> = { '3': 1, '5': 1.3, '7': 1.6, '14': 2.2 };
const platformCount = [
platformsSection.checkbox('facebook')?.value(),
platformsSection.checkbox('instagram')?.value(),
platformsSection.checkbox('twitter')?.value(),
platformsSection.checkbox('linkedin')?.value(),
platformsSection.checkbox('tiktok')?.value(),
platformsSection.checkbox('pinterest')?.value(),
platformsSection.checkbox('youtube')?.value(),
platformsSection.checkbox('threads')?.value()
].filter(Boolean).length;
const baseCost = platformCount * 50;
return Math.round(baseCost * (frequencyMultipliers[frequency] || 1));
},
variant: 'default'
}, '1fr');
});
breakdownSection.addRow(row => {
row.addPriceDisplay('servicesCost', {
label: 'Additional Services',
computedValue: () => {
let total = 0;
if (servicesSection.checkbox('contentCreation')?.value()) total += 200;
if (servicesSection.checkbox('copywriting')?.value()) total += 150;
if (servicesSection.checkbox('communityManagement')?.value()) total += 250;
if (servicesSection.checkbox('influencerOutreach')?.value()) total += 300;
if (servicesSection.checkbox('analytics')?.value()) total += 100;
if (servicesSection.checkbox('adManagement')?.value()) total += 400;
if (servicesSection.checkbox('contentCalendar')?.value()) total += 100;
if (servicesSection.checkbox('brandStrategy')?.value()) total += 200;
const includeStories = frequencySection.checkbox('includeStories')?.value();
const includeReels = frequencySection.checkbox('includeReels')?.value();
if (includeStories) {
const platformCount = [
platformsSection.checkbox('facebook')?.value(),
platformsSection.checkbox('instagram')?.value(),
platformsSection.checkbox('tiktok')?.value()
].filter(Boolean).length;
total += platformCount * 150;
}
if (includeReels) total += 300;
return total;
},
variant: 'default'
});
});
// Summary Section
const summarySection = form.addSubform('summary', {
title: '💰 Monthly Investment',
isCollapsible: false,
sticky: 'bottom'
});
summarySection.addRow(row => {
row.addPriceDisplay('monthlyTotal', {
label: 'Monthly Fee',
computedValue: () => {
let platformTotal = 0;
if (platformsSection.checkbox('facebook')?.value()) platformTotal += 200;
if (platformsSection.checkbox('instagram')?.value()) platformTotal += 250;
if (platformsSection.checkbox('twitter')?.value()) platformTotal += 150;
if (platformsSection.checkbox('linkedin')?.value()) platformTotal += 200;
if (platformsSection.checkbox('tiktok')?.value()) platformTotal += 350;
if (platformsSection.checkbox('pinterest')?.value()) platformTotal += 150;
if (platformsSection.checkbox('youtube')?.value()) platformTotal += 400;
if (platformsSection.checkbox('threads')?.value()) platformTotal += 100;
const frequency = frequencySection.radioButton('postingFrequency')?.value() || '5';
const frequencyMultipliers: Record<string, number> = { '3': 1, '5': 1.3, '7': 1.6, '14': 2.2 };
const platformCount = [
platformsSection.checkbox('facebook')?.value(),
platformsSection.checkbox('instagram')?.value(),
platformsSection.checkbox('twitter')?.value(),
platformsSection.checkbox('linkedin')?.value(),
platformsSection.checkbox('tiktok')?.value(),
platformsSection.checkbox('pinterest')?.value(),
platformsSection.checkbox('youtube')?.value(),
platformsSection.checkbox('threads')?.value()
].filter(Boolean).length;
const frequencyCost = Math.round(platformCount * 50 * (frequencyMultipliers[frequency] || 1));
let serviceTotal = 0;
if (servicesSection.checkbox('contentCreation')?.value()) serviceTotal += 200;
if (servicesSection.checkbox('copywriting')?.value()) serviceTotal += 150;
if (servicesSection.checkbox('communityManagement')?.value()) serviceTotal += 250;
if (servicesSection.checkbox('influencerOutreach')?.value()) serviceTotal += 300;
if (servicesSection.checkbox('analytics')?.value()) serviceTotal += 100;
if (servicesSection.checkbox('adManagement')?.value()) serviceTotal += 400;
if (servicesSection.checkbox('contentCalendar')?.value()) serviceTotal += 100;
if (servicesSection.checkbox('brandStrategy')?.value()) serviceTotal += 200;
if (frequencySection.checkbox('includeStories')?.value()) {
const storiesPlatforms = [
platformsSection.checkbox('facebook')?.value(),
platformsSection.checkbox('instagram')?.value(),
platformsSection.checkbox('tiktok')?.value()
].filter(Boolean).length;
serviceTotal += storiesPlatforms * 150;
}
if (frequencySection.checkbox('includeReels')?.value()) serviceTotal += 300;
let total = platformTotal + frequencyCost + serviceTotal;
const contract = contractSection.dropdown('contractLength')?.value() || '3';
const discounts: Record<string, number> = { '1': 0, '3': 0.05, '6': 0.10, '12': 0.15 };
total *= (1 - (discounts[contract] || 0));
return Math.round(total);
},
variant: 'large'
}, '1fr');
row.addPriceDisplay('setupCost', {
label: 'One-Time Setup',
computedValue: () => {
const contract = contractSection.dropdown('contractLength')?.value() || '3';
const setup = contractSection.dropdown('setupFee')?.value() || 'standard';
if (contract === '12' || setup === 'waived') return 0;
const setupPrices: Record<string, number> = { basic: 299, standard: 499, premium: 999 };
return setupPrices[setup] || 499;
},
variant: 'success'
}, '1fr');
});
summarySection.addRow(row => {
row.addTextPanel('platformsSummary', {
computedValue: () => {
const platforms = [];
if (platformsSection.checkbox('facebook')?.value()) platforms.push('Facebook');
if (platformsSection.checkbox('instagram')?.value()) platforms.push('Instagram');
if (platformsSection.checkbox('twitter')?.value()) platforms.push('X');
if (platformsSection.checkbox('linkedin')?.value()) platforms.push('LinkedIn');
if (platformsSection.checkbox('tiktok')?.value()) platforms.push('TikTok');
if (platformsSection.checkbox('pinterest')?.value()) platforms.push('Pinterest');
if (platformsSection.checkbox('youtube')?.value()) platforms.push('YouTube');
if (platformsSection.checkbox('threads')?.value()) platforms.push('Threads');
return `Managing ${platforms.length} platform${platforms.length !== 1 ? 's' : ''}: ${platforms.join(', ') || 'None selected'}`;
},
customStyles: { 'font-size': '0.9rem', 'text-align': 'center', 'color': '#475569' }
});
});
summarySection.addRow(row => {
row.addTextPanel('disclaimer', {
computedValue: () => 'Prices are estimates. Final pricing may vary based on specific requirements. Ad spend budget not included.',
customStyles: { 'font-size': '0.8rem', 'color': '#94a3b8', 'text-align': 'center' }
});
});
form.configureSubmitButton({
label: 'Get Custom Proposal'
});
}