@scalar/api-client
Version:
the open source API testing client
54 lines (53 loc) • 1.85 kB
JavaScript
import { defineComponent as h, createBlock as x, openBlock as b, unref as o, withCtx as s, createElementVNode as c, toDisplayString as a, createVNode as r, createTextVNode as i } from "vue";
import { ScalarModal as _, 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" }, v = /* @__PURE__ */ h({
__name: "DeleteRequestAuthModal",
props: {
state: {},
scheme: {}
},
emits: ["close", "delete"],
setup(u, { emit: d }) {
const n = u, l = d, { securitySchemeMutators: p } = y(), f = () => {
n.scheme?.id && p.delete(n.scheme.id), l("delete");
};
return (t, e) => (b(), x(o(_), {
size: "xxs",
state: t.state,
title: "Delete Security Scheme"
}, {
default: s(() => [
c("p", S, " This cannot be undone. You're about to delete the " + a(t.scheme?.label) + " security scheme from the collection. ", 1),
c("div", g, [
r(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: e[0] || (e[0] = (k) => l("close"))
}, {
default: s(() => e[1] || (e[1] = [
i(" Cancel ")
])),
_: 1,
__: [1]
}),
r(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(() => [
i(" Delete " + a(t.scheme?.label), 1)
]),
_: 1
})
])
]),
_: 1
}, 8, ["state"]));
}
});
export {
v as default
};