import { defineComponent as i, inject as a, openBlock as s, createBlock as m, unref as t, withModifiers as c, withCtx as d, createVNode as l, pushScopeId as u, popScopeId as f, createElementVNode as h } from "vue";
import { HttpMethod as _ } from "@scalar/api-client";
import { ScalarIcon as b } from "@scalar/components";
import { NEW_API_MODAL as S } from "../../../features.js";
import { apiClientBus as B } from "../../api-client-bus.js";
import { GLOBAL_SECURITY_SYMBOL as C } from "../../../helpers/provideSymbols.js";
import { openClientFor as I } from "../../../helpers/openClientFor.js";
const w = (o) => (u("data-v-4b36d4bc"), o = o(), f(), o), A = /* @__PURE__ */ w(() => /* @__PURE__ */ h("span", null, "Test Request", -1)), T = /* @__PURE__ */ i({
  __name: "TestRequestButton",
  props: {
    operation: {}
  },
  setup(o) {
    const n = a(C);
    return (e, p) => (s(), m(t(_), {
      as: "button",
      class: "show-api-client-button",
      method: e.operation.httpVerb,
      type: "button",
      onClick: p[0] || (p[0] = c((L) => {
        var r;
        return t(S) ? (
          // @scalar/api-client@2.0
          t(B).emit({
            path: e.operation.path,
            method: e.operation.httpVerb
          })
        ) : (
          // @scalar/api-client@1.x
          t(I)(e.operation, (r = t(n)) == null ? void 0 : r())
        );
      }, ["stop"]))
    }, {
      default: d(() => [
        l(t(b), { icon: "PaperAirplane" }),
        A
      ]),
      _: 1
    }, 8, ["method"]));
  }
});
export {
  T as default
};
