UNPKG

@scalar/api-client

Version:

the open source API testing client

32 lines (31 loc) 978 B
import { defineComponent as m, computed as s, createBlock as i, openBlock as a, unref as c, withCtx as d, createElementBlock as u, createCommentVNode as f, toDisplayString as g } from "vue"; import { truncate as p } from "@scalar/helpers/string/truncate"; import x from "../forms/ConfirmationForm.vue.js"; const k = { key: 0, class: "text-c-2 text-sm leading-normal text-pretty" }, $ = /* @__PURE__ */ m({ __name: "DeleteModal", props: { name: {}, warningMessage: {} }, emits: ["close", "delete"], setup(t, { emit: o }) { const n = o, r = s(() => p(t.name)); return (v, e) => (a(), i(c(x), { label: `Delete ${r.value}`, variant: "danger", onCancel: e[0] || (e[0] = (l) => n("close")), onSubmit: e[1] || (e[1] = (l) => n("delete")) }, { default: d(() => [ t.warningMessage ? (a(), u("p", k, g(t.warningMessage), 1)) : f("", !0) ]), _: 1 }, 8, ["label"])); } }); export { $ as default };