/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { assertUnreachable } from "../../utils/dist/assertUnreachable.js";
import { arbitrary_exports } from "./arbitrary.js";
//#region ../fixtures/src/util.ts
function isArbitraryFixture(value) {
	return typeof value === "object" && value !== null && "type" in value && value.type === "arbitraryFixture";
}
/** Registry of all arbitrary fixtures, auto-constructed from exports of arbitrary.ts */
const arbitraryFixtureMap = Object.fromEntries(Object.entries(arbitrary_exports).filter(([, value]) => isArbitraryFixture(value)));
/** Returns the ArbitraryFixture for the given fixture type name, or undefined if it's not an arbitrary fixture */
function getArbitraryFixture(fixtureType) {
	return arbitraryFixtureMap[fixtureType];
}
function validateArbitraryValue(fixture, value) {
	switch (fixture.valueType) {
		case "integer": return typeof value === "number" && Number.isInteger(value) && (fixture.min == null || value >= fixture.min) && (fixture.max == null || value <= fixture.max);
	}
	return assertUnreachable(fixture.valueType);
}
//#endregion
export { getArbitraryFixture, validateArbitraryValue };
