s.type === 'topbar'); if (topbarSection) { topbarSection.config.background_color = $event.detail.topbarBackgroundColor; topbarSection.config.custom_background_color = $event.detail.topbarCustomBackgroundColor; topbarSection.config.logo_type = $event.detail.logoType; topbarSection.config.logo_text = $event.detail.logoText; topbarSection.config.logo_url = $event.detail.logoUrl; topbarSection.config.margin_top = $event.detail.topbarMarginTop; topbarSection.config.margin_bottom = $event.detail.topbarMarginBottom; topbarSection.config.button_phone = $event.detail.topbarButtonPhone; topbarSection.config.button_style = $event.detail.topbarButtonStyle; topbarSection.config.logo_type = $event.detail.logoType; topbarSection.config.logo_in_hero = !!$event.detail.logoInHero; topbarSection.config.logo_white = !!$event.detail.logoWhite; topbarSection.config.phone_in_hero = !!$event.detail.phoneInHero; topbarSection.config.logo_size = $event.detail.logoSize || 48; topbarSection.config.logo_text_only = !!$event.detail.logoTextOnly; console.log('Topbar section updated:', topbarSection); } logoInHero = !!$event.detail.logoInHero;"
@hero-changed.window="const heroSection = sections.find(s => s.id === $event.detail.sectionId); if (heroSection) { heroSection.config.title = $event.detail.heroTitle; heroSection.config.subtitle = $event.detail.heroSubtitle; heroSection.config.button_text = $event.detail.heroButtonText; heroSection.config.button_url = $event.detail.heroButtonUrl; heroSection.config.button_style = $event.detail.heroButtonStyle; heroSection.config.image_url = $event.detail.heroImageUrl; heroSection.config.gradient_from_color = $event.detail.heroGradientFromColor; heroSection.config.gradient_from_shade = $event.detail.heroGradientFromShade; heroSection.config.gradient_to_color = $event.detail.heroGradientToColor; heroSection.config.gradient_to_shade = $event.detail.heroGradientToShade; heroSection.config.show_form = $event.detail.heroShowForm; heroSection.config.mobile_form_placement = $event.detail.heroMobileFormPlacement; }"
@fomo-changed.window="fomoConfig = { enabled: $event.detail.enabled, quote: $event.detail.quote, author: $event.detail.author, stars: $event.detail.stars, position: $event.detail.position, alignment: $event.detail.alignment || 'center' }; if ($event.detail.offerBadge) { offerBadgeConfig = $event.detail.offerBadge; } if ($event.detail.countdownTimer) { countdownTimerConfig = $event.detail.countdownTimer; startCountdownTimer(); } if ($event.detail.limitedSpots) { limitedSpotsConfig = $event.detail.limitedSpots; } if ($event.detail.recentSignups) { recentSignupsConfig = $event.detail.recentSignups; startRecentSignups(); }"
@testimonials-changed.window="showTestimonials = $event.detail.showTestimonials; testimonialsTitle = $event.detail.testimonialsTitle; testimonialsLayout = $event.detail.testimonialsLayout; testimonialsItemsPerLine = $event.detail.testimonialsItemsPerLine; testimonialsPosition = $event.detail.testimonialsPosition; testimonials = $event.detail.testimonials || []; console.log('Testimonials changed:', testimonials);"
@faqs-changed.window="showFaqs = $event.detail.showFaqs; faqsTitle = $event.detail.faqsTitle; faqsLayout = $event.detail.faqsLayout; faqsPosition = $event.detail.faqsPosition; faqs = $event.detail.faqs || []; console.log('FAQs changed:', faqs);"
@sections-updated.window="sections = $event.detail.sections; console.log('Sections updated:', sections); const _ptb = getTopbarSection(); if (_ptb) { logoInHero = !!_ptb.config.logo_in_hero; } $nextTick(() => { window.dispatchEvent(new Event('resize')); });"
@sections-reordered.window="sections = $event.detail.sections; const debugForm = sections.find(s => s.type === 'form' && !s.config?.hidden); console.log('Sections reordered:', sections); console.log('Form section steps:', debugForm?.config?.steps?.length); console.log('Current step should stay at:', $data.currentStep || 'no currentStep in main');"
x-on:section-config-updated.window="const sec = sections.find(s => s.id === $event.detail.sectionId); if (sec) { Object.assign(sec.config, $event.detail.config); if (sec.type === 'topbar') { const _ptb = getTopbarSection(); if (_ptb) logoInHero = !!_ptb.config?.logo_in_hero; } }"
x-effect="const _ptb = getTopbarSection(); if (_ptb) logoInHero = !!_ptb.config?.logo_in_hero">
s.type === 'form' && !s.config?.hidden); currentStep = 0; submitted = false"
@translations-applied.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
@sections-reordered.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
x-on:section-config-updated.window="$nextTick(() => { formSection = sections.find(s => s.type === 'form' && !s.config?.hidden); if (formSection && formSection.config.steps && currentStep >= formSection.config.steps.length) { currentStep = Math.max(0, formSection.config.steps.length - 1); } })"
class="mt-0"
>
s.type === 'form' && !s.config?.hidden); currentStep = 0; submitted = false"
@translations-applied.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
@sections-reordered.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
x-on:section-config-updated.window="$nextTick(() => { formSection = sections.find(s => s.type === 'form' && !s.config?.hidden); if (formSection && formSection.config.steps && currentStep >= formSection.config.steps.length) { currentStep = Math.max(0, formSection.config.steps.length - 1); } })"
class=""
>
s.type === 'form' && !s.config?.hidden); currentStep = 0; submitted = false"
@translations-applied.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
@sections-reordered.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
x-on:section-config-updated.window="$nextTick(() => { formSection = sections.find(s => s.type === 'form' && !s.config?.hidden); if (formSection && formSection.config.steps && currentStep >= formSection.config.steps.length) { currentStep = Math.max(0, formSection.config.steps.length - 1); } })"
class=""
>
s.type === 'form' && !s.config?.hidden); currentStep = 0; submitted = false"
@translations-applied.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
@sections-reordered.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
x-on:section-config-updated.window="$nextTick(() => { formSection = sections.find(s => s.type === 'form' && !s.config?.hidden); if (formSection && formSection.config.steps && currentStep >= formSection.config.steps.length) { currentStep = Math.max(0, formSection.config.steps.length - 1); } })"
class="mt-0"
>
s.type === 'form' && !s.config?.hidden); currentStep = 0; submitted = false"
@translations-applied.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
@sections-reordered.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
x-on:section-config-updated.window="$nextTick(() => { formSection = sections.find(s => s.type === 'form' && !s.config?.hidden); if (formSection && formSection.config.steps && currentStep >= formSection.config.steps.length) { currentStep = Math.max(0, formSection.config.steps.length - 1); } })"
class=""
>
s.type === 'form' && !s.config?.hidden); currentStep = 0; submitted = false"
@translations-applied.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
@sections-reordered.window="formSection = sections.find(s => s.type === 'form' && !s.config?.hidden)"
x-on:section-config-updated.window="$nextTick(() => { formSection = sections.find(s => s.type === 'form' && !s.config?.hidden); if (formSection && formSection.config.steps && currentStep >= formSection.config.steps.length) { currentStep = Math.max(0, formSection.config.steps.length - 1); } })"
class=""
>