UNPKG

@craterapp/vue-sdk

Version:

Embedded Invoicing & Bill Pay for platforms.

73 lines (72 loc) 1.8 kB
import { c as m, t as p, s as f, a as y, u as _, f as v, b } from "./index-IlzZ4Xqv.js"; import { defineComponent as x, computed as n, openBlock as V, createBlock as g, unref as t, withCtx as s, createVNode as k, createTextVNode as S, toDisplayString as $, createElementVNode as h } from "vue"; const q = ["href"], A = /* @__PURE__ */ x({ __name: "CheckboxType", props: { modelValue: { type: String, default: null }, requirements: { type: Array, default: () => [] }, field: { type: Object, required: !0 }, validationScope: { type: String, required: !0 }, label: { type: String, required: !0 }, step: { type: Object } }, setup(e) { const r = e, l = { value: { sameAs: m.withMessage( p("validation.required"), f(!0) ) } }, i = n(() => window.tenant), a = y( l, n(() => r.field), { $scope: r.validationScope } ); return _(), (w, o) => { const u = v, c = b; return V(), g(c, { error: t(a).value.$error && t(a).value.$errors[0].$message }, { default: s(() => [ k(u, { modelValue: e.field.value, "onUpdate:modelValue": o[0] || (o[0] = (d) => e.field.value = d), variant: "primary" }, { default: s(() => [ S($(e.label) + " ", 1), h("a", { class: "text-primary-500 dark:text-primary-400", href: t(i).terms_link, target: "_blank" }, " terms of service", 8, q) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["error"]); }; } }); export { A as default };