/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
const require_util = require("../../../../../../fixtures/src/util.cjs");
//#region ../tailwind-internal/dist/packages/automated-config/dist/utils/buildConfigSchema.js
/*! © 2026 Yahoo, Inc. UDS Tailwind Internal v0.0.0-development */
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
/** Resolves the fixture type by finding which value set contains the given value */
function findFixtureTypeForValue(property, value) {
	const index = property.values.findIndex((arr) => arr.includes(value));
	const fixtureType = property.typeOfFixture[index === -1 ? 0 : index];
	const arbitraryFixture = require_util.getArbitraryFixture(fixtureType);
	if (arbitraryFixture && !require_util.validateArbitraryValue(arbitraryFixture, value)) throw new Error(`Invalid value "${value}" for property "${property.name}": does not satisfy ${fixtureType} constraints`);
	return fixtureType;
}
//#endregion
exports.findFixtureTypeForValue = findFixtureTypeForValue;
