(function(api) {

    api.sectionConstructor['startup-blocks-upsell'] = api.Section.extend({
        attachEvents: function() {},
        isContextuallyActive: function() {
            return true;
        }
    });

    const startup_blocks_section_lists = ['banner', 'service'];
    startup_blocks_section_lists.forEach(startup_blocks_homepage_scroll);

    function startup_blocks_homepage_scroll(item, index) {
        item = item.replace(/-/g, '_');
        wp.customize.section('startup_blocks_' + item + '_section', function(section) {
            section.expanded.bind(function(isExpanding) {
                wp.customize.previewer.send(item, { expanded: isExpanding });
            });
        });
    }
})(wp.customize);