import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
//#region src/v2/features/operation/helpers/combine-params.ts
/** Combine pathItem and operation parameters into a single, dereferenced parameter array */
var combineParams = (pathParams = [], operationParams = []) => {
	const operationKeys = operationParams.flatMap((unresolvedParam) => {
		const param = getResolvedRef(unresolvedParam);
		if (!param) return [];
		return `${param.in}:${param.name}`;
	});
	const operationSet = new Set(operationKeys);
	return [...pathParams.filter((unresolvedParam) => {
		const param = getResolvedRef(unresolvedParam);
		if (!param) return false;
		return !operationSet.has(`${param.in}:${param.name}`);
	}), ...operationParams];
};
//#endregion
export { combineParams };

//# sourceMappingURL=combine-params.js.map