export function emitS2QueryReplacementDev(args) {
    const { paramsSrc, whenRuntimeExpr, sqls, isSelects, endpointExpr, debounceMsExpr, headersRuntimeExpr, callbackRuntimeExpr } = args;
    const whenExpr = whenRuntimeExpr ?? 'true';
    // IMPORTANT: include `when` in the emitted runtime args
    return `s2queryRuntime({
    input: "sql",
    endpoint: ${endpointExpr},
    debounceMs: ${debounceMsExpr},
    headers: ${headersRuntimeExpr},
    callback: ${callbackRuntimeExpr},
    when: (${whenExpr}),
    params: ${paramsSrc},
    qs: ${JSON.stringify(sqls)},
    isSelects: ${JSON.stringify(isSelects)}
  })`;
}
export function emitS2QueryReplacementBuild(args) {
    const { paramsSrc, whenRuntimeExpr, tokens, isSelects, endpointExpr, debounceMsExpr, headersRuntimeExpr, callbackRuntimeExpr } = args;
    const whenExpr = whenRuntimeExpr ?? 'true';
    return `s2queryRuntime({
    input: "token",
    endpoint: ${endpointExpr},
    debounceMs: ${debounceMsExpr},
    headers: ${headersRuntimeExpr},
    callback: ${callbackRuntimeExpr},
    when: (${whenExpr}),
    params: ${paramsSrc},
    qs: ${JSON.stringify(tokens)},
    isSelects: ${JSON.stringify(isSelects)}
  })`;
}
