<!-- Merit Store nav gate - STUDENT pages, which include the _frame_ variant of the footer wildcard
     rather than the regular one. This is what hides the Merit Store link under a student's
     Behavior section.

     The test is written as "in ... [else]" rather than "not in": verified on the sandbox that the
     "in" form evaluates correctly, while a "not in" form evaluated false at a school that was NOT
     in the list, silently emitting nothing. Do not switch this back to "not in".
     The nested [if#mo] handles the narrower case: an ENABLED school whose district has school
     overrides switched off. Only the per-school settings entry is dropped there, and it sits inside
     the enabled branch so the gate script is never included twice on one page. Hiding nav is
     cosmetic - the page itself is gated server-side too. -->
~[if#en.~(curschoolid) in (~[displaypref:meritStoreEnabledSchools])]
	~[if#mo.pref.meritStoreSchoolsCanOverride=1][else#mo]
	<script src="/scripts/meritStore/meritNavGate.js"></script>
	<script>
		meritHideNav(['navMeritStoreSchoolSetup']);
	</script>
	[/if#mo]
[else#en]
<script src="/scripts/meritStore/meritNavGate.js"></script>
<script>
	meritHideNav();
</script>
[/if#en]
