import { post } from './client.js';

/**
 * Evaluate a configured calculation for a test site by forwarding the captured variables.
 * @param {number} testSiteId - Identifier of the test site (TestSiteID) whose calculation definition should be used.
 * @param {Record<string, number|string>} [variables={}] - Input values required by the configured formula.
 * @returns {Promise<any>} API response from `/api/calc/testsite/{testSiteId}`.
 */
export async function calculateByTestSite(testSiteId, variables = {}) {
  return post(`/api/calc/testsite/${testSiteId}`, variables);
}
