UNPKG

@scalar/api-client

Version:

the open source API testing client

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