import { defineComponent as _, computed as v, openBlock as t, createBlock as i, unref as o, withCtx as n, createElementBlock as s, Fragment as u, renderList as b, createVNode as a, createTextVNode as g, toDisplayString as C, createCommentVNode as k } from "vue";
import { ScalarMarkdown as N } from "@scalar/components";
import B from "./Webhook.vue.js";
import j from "../../Section/SectionContainer.vue.js";
import I from "../../Section/Section.vue.js";
import O from "../../Section/SectionContent.vue.js";
import W from "../../Section/SectionHeader.vue.js";
import A from "../../Anchor/Anchor.vue.js";
import { useNavState as D } from "../../../hooks/useNavState.js";
const G = /* @__PURE__ */ _({
  __name: "Webhooks",
  props: {
    webhooks: {}
  },
  setup(y) {
    const S = y, c = v(() => Object.keys(S.webhooks ?? {})), { getWebhookId: d } = D();
    return (l, E) => c.value.length ? (t(), i(o(j), { key: 0 }, {
      default: n(() => [
        (t(!0), s(u, null, b(c.value, (e) => {
          var m;
          return t(), s(u, { key: e }, [
            (t(!0), s(u, null, b(Object.keys(
              (m = l.webhooks) == null ? void 0 : m[e]
            ), (r) => (t(), i(o(I), {
              id: o(d)(e, r),
              key: r,
              label: e
            }, {
              default: n(() => {
                var f;
                return [
                  (f = l.webhooks) != null && f[e] ? (t(), i(o(O), { key: 0 }, {
                    default: n(() => {
                      var p, w;
                      return [
                        a(o(W), { level: 2 }, {
                          default: n(() => [
                            a(o(A), {
                              id: o(d)(e, r)
                            }, {
                              default: n(() => {
                                var h;
                                return [
                                  g(C((h = l.webhooks[e][r]) == null ? void 0 : h.name), 1)
                                ];
                              }),
                              _: 2
                            }, 1032, ["id"])
                          ]),
                          _: 2
                        }, 1024),
                        (p = l.webhooks[e][r]) != null && p.description ? (t(), i(o(N), {
                          key: 0,
                          value: (w = l.webhooks[e][r]) == null ? void 0 : w.description,
                          withImages: ""
                        }, null, 8, ["value"])) : k("", !0),
                        a(B, {
                          webhook: l.webhooks[e][r]
                        }, null, 8, ["webhook"])
                      ];
                    }),
                    _: 2
                  }, 1024)) : k("", !0)
                ];
              }),
              _: 2
            }, 1032, ["id", "label"]))), 128))
          ], 64);
        }), 128))
      ]),
      _: 1
    })) : k("", !0);
  }
});
export {
  G as default
};
