"use strict";
const fs=require("fs"),vm=require("vm");
const app=fs.readFileSync(__dirname+"/../workbench/app.js","utf8");
new vm.Script(app);
const required=["ownerTemporarySelfReview","owner_self_review_override","CLAIM_TEMPLATES","renderQueueTab","renderCoverageTab","FOUNDATION_MEDICATIONS","seedFoundationMedicationSet","createMissingResearchAssignments","renderSettingsTab"];
for(const token of required){if(!app.includes(token))throw new Error("Missing "+token);}
const medMatch=app.match(/const FOUNDATION_MEDICATIONS=\[(.*?)\];/s);if(!medMatch)throw new Error("Foundation set missing");
const count=(medMatch[1].match(/"/g)||[]).length/2;if(count!==50)throw new Error("Expected 50 foundation medications, got "+count);
console.log("Sprint 5 static tests passed; foundation medication count:",count);
