export function corporateEventCalculator(form: FormTs) {
form.addRow(row => {
row.addTextPanel('header', {
computedValue: () => 'Corporate Event Cost Calculator',
customStyles: { 'font-size': '1.5rem', 'font-weight': '600', 'color': '#1e293b' }
});
});
form.addSpacer({ height: 20 });
// Event Details Section
const eventSection = form.addSubform('event', { title: '🎯 Event Details' });
eventSection.addRow(row => {
row.addDropdown('eventType', {
label: 'Event Type',
options: [
{ id: 'conference', name: 'Conference/Summit' },
{ id: 'seminar', name: 'Seminar/Workshop' },
{ id: 'teambuilding', name: 'Team Building Event' },
{ id: 'gala', name: 'Gala/Awards Dinner' },
{ id: 'product-launch', name: 'Product Launch' },
{ id: 'networking', name: 'Networking Event' },
{ id: 'holiday', name: 'Holiday Party' },
{ id: 'retreat', name: 'Corporate Retreat' }
],
defaultValue: 'conference',
isRequired: true
}, '1fr');
row.addDropdown('eventScale', {
label: 'Event Scale',
options: [
{ id: 'intimate', name: 'Intimate (10-30 guests)' },
{ id: 'small', name: 'Small (31-75 guests)' },
{ id: 'medium', name: 'Medium (76-150 guests)' },
{ id: 'large', name: 'Large (151-300 guests)' },
{ id: 'major', name: 'Major (300+ guests)' }
],
defaultValue: 'medium',
isRequired: true
}, '1fr');
});
eventSection.addRow(row => {
row.addInteger('guestCount', {
label: 'Expected Guests',
min: 10,
max: 2000,
defaultValue: 100,
isRequired: true
}, '1fr');
row.addInteger('eventDuration', {
label: 'Duration (Hours)',
min: 1,
max: 72,
defaultValue: 8,
tooltip: 'Total event duration including setup and breakdown'
}, '1fr');
});
// Venue Section
const venueSection = form.addSubform('venue', { title: '🏛️ Venue & Space' });
venueSection.addRow(row => {
row.addDropdown('venueType', {
label: 'Venue Type',
options: [
{ id: 'hotel', name: 'Hotel Ballroom' },
{ id: 'convention', name: 'Convention Center' },
{ id: 'restaurant', name: 'Private Restaurant' },
{ id: 'outdoor', name: 'Outdoor Venue' },
{ id: 'unique', name: 'Unique Venue (Museum, Rooftop)' },
{ id: 'office', name: 'Office Space (Own/Rented)' },
{ id: 'virtual', name: 'Virtual Event Platform' }
],
defaultValue: 'hotel',
isRequired: true
}, '1fr');
row.addDropdown('venueLocation', {
label: 'Location Tier',
options: [
{ id: 'budget', name: 'Budget Friendly' },
{ id: 'standard', name: 'Standard' },
{ id: 'premium', name: 'Premium' },
{ id: 'luxury', name: 'Luxury/Exclusive' }
],
defaultValue: 'standard'
}, '1fr');
});
venueSection.addRow(row => {
row.addCheckbox('avEquipment', {
label: 'AV Equipment Rental',
defaultValue: true,
tooltip: 'Projectors, screens, microphones, speakers'
}, '1fr');
row.addCheckbox('staging', {
label: 'Stage/Podium Setup',
defaultValue: false
}, '1fr');
});
// Catering Section
const cateringSection = form.addSubform('catering', { title: '🍽️ Catering & Beverages' });
cateringSection.addRow(row => {
row.addRadioButton('cateringStyle', {
label: 'Catering Style',
options: [
{ id: 'none', name: 'No Catering' },
{ id: 'refreshments', name: 'Light Refreshments ($15/person)' },
{ id: 'breakfast', name: 'Breakfast/Brunch ($35/person)' },
{ id: 'lunch', name: 'Lunch Buffet ($45/person)' },
{ id: 'dinner', name: 'Plated Dinner ($75/person)' },
{ id: 'premium', name: 'Premium Multi-Course ($125/person)' }
],
defaultValue: 'lunch',
isRequired: true
});
});
cateringSection.addRow(row => {
row.addDropdown('beverageService', {
label: 'Beverage Service',
options: [
{ id: 'none', name: 'None' },
{ id: 'coffee', name: 'Coffee/Tea Service ($5/person)' },
{ id: 'soft', name: 'Soft Drinks & Coffee ($10/person)' },
{ id: 'hosted-bar', name: 'Hosted Bar ($35/person)' },
{ id: 'premium-bar', name: 'Premium Open Bar ($55/person)' },
{ id: 'cash-bar', name: 'Cash Bar (No cost)' }
],
defaultValue: 'soft'
}, '1fr');
row.addCheckbox('dietaryOptions', {
label: 'Special Dietary Options (+10%)',
defaultValue: true,
tooltip: 'Vegetarian, vegan, gluten-free options'
}, '1fr');
});
// Entertainment Section
const entertainmentSection = form.addSubform('entertainment', { title: '🎭 Entertainment & Activities' });
entertainmentSection.addRow(row => {
row.addCheckbox('keynote', {
label: 'Keynote Speaker ($2,000-$10,000)',
defaultValue: false
}, '1fr');
row.addCheckbox('liveMusic', {
label: 'Live Music/Band ($1,500-$5,000)',
defaultValue: false
}, '1fr');
});
entertainmentSection.addRow(row => {
row.addCheckbox('dj', {
label: 'DJ Services ($500-$1,500)',
defaultValue: false
}, '1fr');
row.addCheckbox('photoBooth', {
label: 'Photo Booth ($800-$1,500)',
defaultValue: false
}, '1fr');
});
entertainmentSection.addRow(row => {
row.addCheckbox('teamActivities', {
label: 'Team Building Activities ($30/person)',
defaultValue: false
}, '1fr');
row.addCheckbox('mcHost', {
label: 'MC/Event Host ($800-$2,000)',
defaultValue: false
}, '1fr');
});
// Production Section
const productionSection = form.addSubform('production', { title: '🎬 Production & Technology' });
productionSection.addRow(row => {
row.addCheckbox('eventApp', {
label: 'Event App/Registration Platform ($500-$2,000)',
defaultValue: false
}, '1fr');
row.addCheckbox('liveStreaming', {
label: 'Live Streaming Setup ($1,500-$5,000)',
defaultValue: false
}, '1fr');
});
productionSection.addRow(row => {
row.addCheckbox('photography', {
label: 'Professional Photography ($1,000-$3,000)',
defaultValue: false
}, '1fr');
row.addCheckbox('videography', {
label: 'Videography/Highlights ($2,000-$5,000)',
defaultValue: false
}, '1fr');
});
// Additional Services Section
const additionalSection = form.addSubform('additional', { title: '✨ Additional Services' });
additionalSection.addRow(row => {
row.addCheckbox('decorations', {
label: 'Event Decorations/Florals ($1,000-$5,000)',
defaultValue: false
}, '1fr');
row.addCheckbox('swag', {
label: 'Branded Swag/Gifts ($25/person)',
defaultValue: false
}, '1fr');
});
additionalSection.addRow(row => {
row.addCheckbox('transportation', {
label: 'Guest Transportation ($500-$3,000)',
defaultValue: false
}, '1fr');
row.addCheckbox('eventPlanner', {
label: 'Professional Event Planner (15% of total)',
defaultValue: false,
tooltip: 'Full-service event planning and coordination'
}, '1fr');
});
additionalSection.addRow(row => {
row.addCheckbox('signage', {
label: 'Custom Signage & Banners ($500-$2,000)',
defaultValue: false
}, '1fr');
row.addCheckbox('security', {
label: 'Security Personnel ($300/guard)',
defaultValue: false
}, '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('venueCost', {
label: 'Venue & Space',
computedValue: () => {
const guests = eventSection.integer('guestCount')?.value() || 100;
const duration = eventSection.integer('eventDuration')?.value() || 8;
const venueType = venueSection.dropdown('venueType')?.value() || 'hotel';
const location = venueSection.dropdown('venueLocation')?.value() || 'standard';
const venueBase: Record<string, number> = {
'hotel': 2000, 'convention': 3000, 'restaurant': 1500,
'outdoor': 1800, 'unique': 4000, 'office': 500, 'virtual': 300
};
const locationMultiplier: Record<string, number> = {
'budget': 0.6, 'standard': 1, 'premium': 1.8, 'luxury': 3
};
let cost = (venueBase[venueType] || 2000) * (locationMultiplier[location] || 1);
cost += guests * 10;
cost += (duration > 4 ? (duration - 4) * 200 : 0);
if (venueSection.checkbox('avEquipment')?.value()) cost += 800 + guests * 5;
if (venueSection.checkbox('staging')?.value()) cost += 1500;
return Math.round(cost);
},
variant: 'default'
}, '1fr');
row.addPriceDisplay('cateringCost', {
label: 'Catering & Beverages',
computedValue: () => {
const guests = eventSection.integer('guestCount')?.value() || 100;
const catering = cateringSection.radioButton('cateringStyle')?.value() || 'lunch';
const beverages = cateringSection.dropdown('beverageService')?.value() || 'soft';
const dietary = cateringSection.checkbox('dietaryOptions')?.value() || false;
const cateringPrices: Record<string, number> = {
'none': 0, 'refreshments': 15, 'breakfast': 35, 'lunch': 45, 'dinner': 75, 'premium': 125
};
const beveragePrices: Record<string, number> = {
'none': 0, 'coffee': 5, 'soft': 10, 'hosted-bar': 35, 'premium-bar': 55, 'cash-bar': 0
};
let cost = guests * (cateringPrices[catering] || 0);
cost += guests * (beveragePrices[beverages] || 0);
if (dietary && cost > 0) cost *= 1.1;
return Math.round(cost);
},
variant: 'default'
}, '1fr');
});
breakdownSection.addRow(row => {
row.addPriceDisplay('entertainmentCost', {
label: 'Entertainment',
computedValue: () => {
const guests = eventSection.integer('guestCount')?.value() || 100;
let cost = 0;
if (entertainmentSection.checkbox('keynote')?.value()) cost += 5000;
if (entertainmentSection.checkbox('liveMusic')?.value()) cost += 3000;
if (entertainmentSection.checkbox('dj')?.value()) cost += 1000;
if (entertainmentSection.checkbox('photoBooth')?.value()) cost += 1200;
if (entertainmentSection.checkbox('teamActivities')?.value()) cost += guests * 30;
if (entertainmentSection.checkbox('mcHost')?.value()) cost += 1500;
return Math.round(cost);
},
variant: 'default'
}, '1fr');
row.addPriceDisplay('productionCost', {
label: 'Production & Tech',
computedValue: () => {
let cost = 0;
if (productionSection.checkbox('eventApp')?.value()) cost += 1200;
if (productionSection.checkbox('liveStreaming')?.value()) cost += 3000;
if (productionSection.checkbox('photography')?.value()) cost += 2000;
if (productionSection.checkbox('videography')?.value()) cost += 3500;
return Math.round(cost);
},
variant: 'default'
}, '1fr');
});
// Summary Section
const summarySection = form.addSubform('summary', {
title: '💰 Total Event Budget',
isCollapsible: false,
sticky: 'bottom'
});
summarySection.addRow(row => {
row.addPriceDisplay('totalCost', {
label: 'Estimated Total',
computedValue: () => {
const guests = eventSection.integer('guestCount')?.value() || 100;
const duration = eventSection.integer('eventDuration')?.value() || 8;
const venueType = venueSection.dropdown('venueType')?.value() || 'hotel';
const location = venueSection.dropdown('venueLocation')?.value() || 'standard';
const catering = cateringSection.radioButton('cateringStyle')?.value() || 'lunch';
const beverages = cateringSection.dropdown('beverageService')?.value() || 'soft';
const venueBase: Record<string, number> = {
'hotel': 2000, 'convention': 3000, 'restaurant': 1500,
'outdoor': 1800, 'unique': 4000, 'office': 500, 'virtual': 300
};
const locationMultiplier: Record<string, number> = { 'budget': 0.6, 'standard': 1, 'premium': 1.8, 'luxury': 3 };
const cateringPrices: Record<string, number> = { 'none': 0, 'refreshments': 15, 'breakfast': 35, 'lunch': 45, 'dinner': 75, 'premium': 125 };
const beveragePrices: Record<string, number> = { 'none': 0, 'coffee': 5, 'soft': 10, 'hosted-bar': 35, 'premium-bar': 55, 'cash-bar': 0 };
let venueCost = (venueBase[venueType] || 2000) * (locationMultiplier[location] || 1);
venueCost += guests * 10 + (duration > 4 ? (duration - 4) * 200 : 0);
if (venueSection.checkbox('avEquipment')?.value()) venueCost += 800 + guests * 5;
if (venueSection.checkbox('staging')?.value()) venueCost += 1500;
let cateringCost = guests * (cateringPrices[catering] || 0) + guests * (beveragePrices[beverages] || 0);
if (cateringSection.checkbox('dietaryOptions')?.value() && cateringCost > 0) cateringCost *= 1.1;
let entertainmentCost = 0;
if (entertainmentSection.checkbox('keynote')?.value()) entertainmentCost += 5000;
if (entertainmentSection.checkbox('liveMusic')?.value()) entertainmentCost += 3000;
if (entertainmentSection.checkbox('dj')?.value()) entertainmentCost += 1000;
if (entertainmentSection.checkbox('photoBooth')?.value()) entertainmentCost += 1200;
if (entertainmentSection.checkbox('teamActivities')?.value()) entertainmentCost += guests * 30;
if (entertainmentSection.checkbox('mcHost')?.value()) entertainmentCost += 1500;
let productionCost = 0;
if (productionSection.checkbox('eventApp')?.value()) productionCost += 1200;
if (productionSection.checkbox('liveStreaming')?.value()) productionCost += 3000;
if (productionSection.checkbox('photography')?.value()) productionCost += 2000;
if (productionSection.checkbox('videography')?.value()) productionCost += 3500;
let additionalCost = 0;
if (additionalSection.checkbox('decorations')?.value()) additionalCost += 2500;
if (additionalSection.checkbox('swag')?.value()) additionalCost += guests * 25;
if (additionalSection.checkbox('transportation')?.value()) additionalCost += 1500;
if (additionalSection.checkbox('signage')?.value()) additionalCost += 1200;
if (additionalSection.checkbox('security')?.value()) additionalCost += Math.ceil(guests / 100) * 300;
let total = venueCost + cateringCost + entertainmentCost + productionCost + additionalCost;
if (additionalSection.checkbox('eventPlanner')?.value()) total *= 1.15;
return Math.round(total);
},
variant: 'large'
}, '1fr');
row.addTextPanel('perPerson', {
label: 'Per Person',
computedValue: () => {
const guests = eventSection.integer('guestCount')?.value() || 100;
const duration = eventSection.integer('eventDuration')?.value() || 8;
const venueType = venueSection.dropdown('venueType')?.value() || 'hotel';
const location = venueSection.dropdown('venueLocation')?.value() || 'standard';
const catering = cateringSection.radioButton('cateringStyle')?.value() || 'lunch';
const beverages = cateringSection.dropdown('beverageService')?.value() || 'soft';
const venueBase: Record<string, number> = {
'hotel': 2000, 'convention': 3000, 'restaurant': 1500,
'outdoor': 1800, 'unique': 4000, 'office': 500, 'virtual': 300
};
const locationMultiplier: Record<string, number> = { 'budget': 0.6, 'standard': 1, 'premium': 1.8, 'luxury': 3 };
const cateringPrices: Record<string, number> = { 'none': 0, 'refreshments': 15, 'breakfast': 35, 'lunch': 45, 'dinner': 75, 'premium': 125 };
const beveragePrices: Record<string, number> = { 'none': 0, 'coffee': 5, 'soft': 10, 'hosted-bar': 35, 'premium-bar': 55, 'cash-bar': 0 };
let venueCost = (venueBase[venueType] || 2000) * (locationMultiplier[location] || 1);
venueCost += guests * 10 + (duration > 4 ? (duration - 4) * 200 : 0);
if (venueSection.checkbox('avEquipment')?.value()) venueCost += 800 + guests * 5;
if (venueSection.checkbox('staging')?.value()) venueCost += 1500;
let cateringCost = guests * (cateringPrices[catering] || 0) + guests * (beveragePrices[beverages] || 0);
if (cateringSection.checkbox('dietaryOptions')?.value() && cateringCost > 0) cateringCost *= 1.1;
let entertainmentCost = 0;
if (entertainmentSection.checkbox('keynote')?.value()) entertainmentCost += 5000;
if (entertainmentSection.checkbox('liveMusic')?.value()) entertainmentCost += 3000;
if (entertainmentSection.checkbox('dj')?.value()) entertainmentCost += 1000;
if (entertainmentSection.checkbox('photoBooth')?.value()) entertainmentCost += 1200;
if (entertainmentSection.checkbox('teamActivities')?.value()) entertainmentCost += guests * 30;
if (entertainmentSection.checkbox('mcHost')?.value()) entertainmentCost += 1500;
let productionCost = 0;
if (productionSection.checkbox('eventApp')?.value()) productionCost += 1200;
if (productionSection.checkbox('liveStreaming')?.value()) productionCost += 3000;
if (productionSection.checkbox('photography')?.value()) productionCost += 2000;
if (productionSection.checkbox('videography')?.value()) productionCost += 3500;
let additionalCost = 0;
if (additionalSection.checkbox('decorations')?.value()) additionalCost += 2500;
if (additionalSection.checkbox('swag')?.value()) additionalCost += guests * 25;
if (additionalSection.checkbox('transportation')?.value()) additionalCost += 1500;
if (additionalSection.checkbox('signage')?.value()) additionalCost += 1200;
if (additionalSection.checkbox('security')?.value()) additionalCost += Math.ceil(guests / 100) * 300;
let total = venueCost + cateringCost + entertainmentCost + productionCost + additionalCost;
if (additionalSection.checkbox('eventPlanner')?.value()) total *= 1.15;
return `$${Math.round(total / guests).toLocaleString()}`;
},
customStyles: { 'font-size': '1.5rem', 'font-weight': '600', 'text-align': 'center', 'color': '#059669' }
}, '1fr');
});
summarySection.addRow(row => {
row.addTextPanel('eventSummary', {
computedValue: () => {
const eventType = eventSection.dropdown('eventType')?.value() || 'conference';
const guests = eventSection.integer('guestCount')?.value() || 100;
const duration = eventSection.integer('eventDuration')?.value() || 8;
const eventNames: Record<string, string> = {
'conference': 'Conference', 'seminar': 'Seminar', 'teambuilding': 'Team Building',
'gala': 'Gala Dinner', 'product-launch': 'Product Launch', 'networking': 'Networking Event',
'holiday': 'Holiday Party', 'retreat': 'Corporate Retreat'
};
return `${eventNames[eventType] || 'Event'} for ${guests} guests, ${duration} hours`;
},
customStyles: { 'font-size': '0.95rem', 'text-align': 'center', 'color': '#475569' }
});
});
summarySection.addRow(row => {
row.addTextPanel('disclaimer', {
computedValue: () => 'Estimates based on average market rates. Actual costs vary by location, date, and vendor selection.',
customStyles: { 'font-size': '0.8rem', 'color': '#94a3b8', 'text-align': 'center' }
});
});
form.configureSubmitButton({
label: 'Request Detailed Quote'
});
}