import { defineComponent as m, createBlock as r, createElementBlock as a, openBlock as t, unref as e } from "vue";
import { ScalarCodeBlock as l } from "@scalar/components";
import { getExampleFromSchema as p } from "@scalar/oas-utils/spec-getters";
import { getResolvedRef as c } from "@scalar/workspace-store/helpers/get-resolved-ref";
import { getResolvedRefDeep as f } from "./helpers/get-resolved-ref-deep.js";
const i = {
  key: 2,
  class: "empty-state"
}, v = /* @__PURE__ */ m({
  __name: "ExampleResponse",
  props: {
    response: {},
    example: {}
  },
  setup(d) {
    return (o, u) => {
      var n, s;
      return o.example !== void 0 ? (t(), r(e(l), {
        key: 0,
        class: "bg-b-2 -outline-offset-2",
        content: (n = e(f)(o.example)) == null ? void 0 : n.value,
        lang: "json"
      }, null, 8, ["content"])) : (s = o.response) != null && s.schema ? (t(), r(e(l), {
        key: 1,
        class: "bg-b-2 -outline-offset-2",
        content: e(p)(e(c)(o.response.schema), {
          emptyString: "string",
          mode: "read"
        }),
        lang: "json"
      }, null, 8, ["content"])) : (t(), a("div", i, " No Body "));
    };
  }
});
export {
  v as default
};
