import { useServerStore as r, useOpenApiStore as s, useApiClientStore as n, useRequestStore as i } from "@scalar/api-client";
import { getApiClientRequest as u } from "./getApiClientRequest.js";
const { server: l } = r(), { setOperation: c, setGlobalSecurity: p } = s(), { toggleApiClient: S } = n(), { setActiveRequest: a, resetActiveResponse: A } = i();
function m(e, o) {
  const t = u({
    serverState: l,
    operation: e,
    // Let the API client handle the authentication.
    authenticationState: null,
    globalSecurity: null
  });
  A(), a(t), c(e), p(o), S(t, !0);
}
export {
  m as openClientFor
};
