UNPKG

@scalar/api-client

Version:

the open source API testing client

53 lines (52 loc) 1.84 kB
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 y, ScalarButton as m } from "@scalar/components"; import { useWorkspace as S } from "../../../../store/store.js"; const _ = { 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 } = S(), f = () => { n.scheme?.id && p.delete(n.scheme.id), l("delete"); }; return (t, e) => (b(), x(o(y), { size: "xxs", state: t.state, title: "Delete Security Scheme" }, { default: s(() => [ c("p", _, " 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 };