UNPKG

@wetspace/pro-components

Version:
28 lines (27 loc) 902 B
import { defineComponent as n, shallowRef as m, computed as s, watch as u, onMounted as p, openBlock as c, createElementBlock as d, renderSlot as i } from "vue"; import { wetProPageLabelsItemProps as f } from "./types.mjs"; import { usePageLabels as g } from "../../hooks/use-page-labels.mjs"; import v from "../../node_modules/.pnpm/uuid@11.0.3/node_modules/uuid/dist/esm-browser/v4.mjs"; const w = /* @__PURE__ */ n({ __name: "item", props: f, setup(r) { const { addPageLabel: a } = g(), e = r, o = m(v()), l = s(() => ({ loading: e.loading, label: e.label, isHome: e.isHome, pageKey: e.pageKey, fullPath: e.routeFullPath })); return u(l, (t) => { o.value = a(o.value, t); }), p(() => { o.value = a(o.value, l.value, !0); }), (t, P) => (c(), d("div", null, [ i(t.$slots, "default") ])); } }); export { w as default };