@scalar/api-client
Version:
the open source API testing client
53 lines (52 loc) • 1.84 kB
JavaScript
import { defineComponent as h, createBlock as p, openBlock as x, unref as o, withCtx as s, createElementVNode as c, toDisplayString as a, createVNode as i, createTextVNode as r } from "vue";
import { ScalarModal as b, ScalarButton as m } from "@scalar/components";
import { useWorkspace as y } from "../../../../store/store.js";
const S = { class: "text-c-2 mb-4 text-sm leading-normal" }, g = { class: "flex justify-between gap-2" }, B = /* @__PURE__ */ h({
__name: "DeleteRequestAuthModal",
props: {
state: {},
scheme: {}
},
emits: ["close", "delete"],
setup(e, { emit: u }) {
const n = e, l = u, { securitySchemeMutators: d } = y(), f = () => {
n.scheme?.id && d.delete(n.scheme.id), l("delete");
};
return (k, t) => (x(), p(o(b), {
size: "xxs",
state: e.state,
title: "Delete Security Scheme"
}, {
default: s(() => [
c("p", S, " This cannot be undone. You're about to delete the " + a(e.scheme?.label) + " security scheme from the collection. ", 1),
c("div", g, [
i(o(m), {
class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
type: "button",
variant: "outlined",
onClick: t[0] || (t[0] = (C) => l("close"))
}, {
default: s(() => [...t[1] || (t[1] = [
r(" Cancel ", -1)
])]),
_: 1
}),
i(o(m), {
class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
type: "submit",
onClick: f
}, {
default: s(() => [
r(" Delete " + a(e.scheme?.label), 1)
]),
_: 1
})
])
]),
_: 1
}, 8, ["state"]));
}
});
export {
B as default
};