import { defineComponent as w, onMounted as q, onBeforeUnmount as R, createElementBlock as n, openBlock as l, createElementVNode as s, createCommentVNode as m, normalizeClass as y, unref as t, createVNode as i, createTextVNode as c, toDisplayString as h, nextTick as S } from "vue";
import { ScalarHotkey as d } from "@scalar/components";
import { useRoute as C, useRouter as N } from "vue-router";
import B from "../../../assets/computer.ascii.js";
import V from "../../../components/EmptyState.vue.js";
import E from "../../../components/ScalarAsciiArt.vue.js";
import { useWorkspace as K } from "../../../store/store.js";
import { useLayout as A } from "../../../hooks/useLayout.js";
const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize" }, $ = {
  key: 0,
  class: "scalar-version-number"
}, j = { class: "text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm" }, U = /* @__PURE__ */ w({
  __name: "ResponseEmpty",
  props: {
    collection: {},
    operation: {},
    workspace: {},
    numWorkspaceRequests: {}
  },
  setup(o) {
    const { events: a, requestMutators: x } = K(), g = C(), b = N(), { layout: r } = A(), p = () => {
      const u = o.operation.tags?.length ? { tags: o.operation.tags[0] ? [o.operation.tags[0]] : [] } : {}, e = x.add(u, o.collection.uid);
      e && (b.push({
        name: "request",
        params: {
          workspace: o.workspace.uid,
          request: e.uid
        }
      }), S(() => {
        a.hotKeys.emit({
          focusAddressBar: new KeyboardEvent("keydown", { key: "l" })
        });
      }));
    }, f = (u) => {
      u?.createNew && g.name === "request" && p();
    }, v = "2.37.0";
    return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
      s("div", {
        class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
          "hidden opacity-0": o.numWorkspaceRequests <= 1 && t(r) !== "modal"
        }])
      }, [
        t(r) !== "modal" ? (l(), n("div", $, [
          c(" Scalar App V" + h(t(v)) + " Beta ", 1),
          e[3] || (e[3] = s("div", { class: "mt-2" }, [
            s("a", {
              href: "https://github.com/scalar/scalar/issues/2669",
              target: "_blank"
            }, " Roadmap ")
          ], -1))
        ])) : m("", !0),
        e[4] || (e[4] = s("a", {
          class: "gitbook-show scalar-version-number",
          href: "https://www.scalar.com",
          target: "_blank"
        }, " Powered By Scalar.com ", -1)),
        i(E, {
          art: t(B),
          class: "text-c-3"
        }, null, 8, ["art"])
      ], 2),
      t(r) !== "modal" ? (l(), n("div", {
        key: 0,
        class: y(["hidden h-[calc(100%_-_50px)] items-center justify-center pb-5", {
          "!flex opacity-100": o.numWorkspaceRequests == 1
        }])
      }, [
        i(V)
      ], 2)) : m("", !0),
      s("div", j, [
        t(r) !== "modal" ? (l(), n("button", {
          key: 0,
          class: "flex items-center gap-1.5",
          type: "button",
          onClick: e[0] || (e[0] = (k) => t(a).commandPalette.emit())
        }, [
          e[5] || (e[5] = c(" Get Started ", -1)),
          i(t(d), { hotkey: "k" })
        ])) : m("", !0),
        t(r) === "desktop" ? (l(), n("button", {
          key: 1,
          class: "flex items-center gap-1.5",
          type: "button",
          onClick: e[1] || (e[1] = (k) => p())
        }, [
          e[6] || (e[6] = c(" New Request ", -1)),
          i(t(d), { hotkey: "N" })
        ])) : m("", !0),
        s("button", {
          class: "flex items-center gap-1.5",
          type: "button",
          onClick: e[2] || (e[2] = (k) => t(a).executeRequest.emit())
        }, [
          e[7] || (e[7] = c(" Send Request ", -1)),
          i(t(d), { hotkey: "↵" })
        ])
      ])
    ]));
  }
});
export {
  U as default
};
