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

	const vividoneSections = ['Intro', 'Features', 'Testimonials'];
	vividoneSections.forEach(vividone_scroll_handler);

	function vividone_scroll_handler(sectionName) {
		const id = sectionName.replace(/-/g, '_');
		wp.customize.section('vividone_' + id + '_section', function (section) {
			section.expanded.bind(function (isExpanded) {
				wp.customize.previewer.send(id, { expanded: isExpanded });
			});
		});
	}
})(wp.customize);
