UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

58 lines (57 loc) 1.97 kB
import { defineComponent as h, useTemplateRef as x, createBlock as _, openBlock as b, unref as o, withCtx as s, createElementVNode as a, toDisplayString as c, createVNode as i, createTextVNode as m } from "vue"; import { ScalarModal as y, ScalarButton as u } from "@scalar/components"; import { emitCustomEvent as w } from "@scalar/workspace-store/events"; const C = { class: "text-c-2 mb-4 text-sm leading-normal" }, S = { class: "flex justify-between gap-2" }, D = /* @__PURE__ */ h({ __name: "DeleteRequestAuthModal", props: { state: {}, scheme: {} }, emits: ["close", "delete"], setup(p, { emit: d }) { const n = p, l = d, f = () => { n.scheme?.id && w(r.value?.$el, "scalar-delete-security-scheme", { uid: n.scheme.id }), l("delete"); }, r = x("wrapperRef"); return (t, e) => (b(), _(o(y), { ref_key: "wrapperRef", ref: r, size: "xxs", state: t.state, title: "Delete Security Scheme" }, { default: s(() => [ a("p", C, " This cannot be undone. You're about to delete the " + c(t.scheme?.label) + " security scheme from the collection. ", 1), a("div", S, [ i(o(u), { class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none", type: "button", variant: "outlined", onClick: e[0] || (e[0] = (g) => l("close")) }, { default: s(() => e[1] || (e[1] = [ m(" Cancel ") ])), _: 1, __: [1] }), i(o(u), { class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none", type: "submit", onClick: f }, { default: s(() => [ m(" Delete " + c(t.scheme?.label), 1) ]), _: 1 }) ]) ]), _: 1 }, 8, ["state"])); } }); export { D as default };