(function($) {
	'use strict';

	$(function() {
		if (window.location.hash !== '#evge-first-registration-admin-notice') {
			return;
		}
		var el = document.getElementById('evge-first-registration-admin-notice');
		if (el && typeof el.scrollIntoView === 'function') {
			el.scrollIntoView({ behavior: 'smooth', block: 'start' });
		}
	});

	$(document).on('click', '#evge-settings-checklist-toggle', function() {
		var $btn = $(this);
		var $panel = $('#evge-settings-checklist');
		var $body = $('#evge-settings-checklist-body');
		var collapsed = $panel.hasClass('evge-settings-checklist-collapsed');
		if (collapsed) {
			$panel.removeClass('evge-settings-checklist-collapsed');
			$body.removeAttr('aria-hidden');
			$btn.attr('aria-expanded', 'true');
		} else {
			$panel.addClass('evge-settings-checklist-collapsed');
			$body.attr('aria-hidden', 'true');
			$btn.attr('aria-expanded', 'false');
		}
	});

})(jQuery);
