@empathyco/x-components
Version:
Empathy X Components
42 lines (39 loc) • 1.55 kB
JavaScript
import _sfc_main from './base-suggestion.vue2.js';
import { resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, createVNode, toDisplayString, createCommentVNode } from 'vue';
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
const _hoisted_1 = {
key: 0,
class: "x-suggestion__filter"
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_Highlight = resolveComponent("Highlight");
return openBlock(), createElementBlock(
"button",
{
ref: "el",
class: normalizeClass(_ctx.dynamicCSSClasses),
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.emitEvents && _ctx.emitEvents(...args))
},
[
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ query: _ctx.query, suggestion: _ctx.suggestion, filter: _ctx.filter })), () => [
createVNode(_component_Highlight, {
class: "x-suggestion__query",
text: _ctx.suggestion.query,
highlight: _ctx.query
}, null, 8, ["text", "highlight"]),
_ctx.filter ? (openBlock(), createElementBlock(
"span",
_hoisted_1,
toDisplayString(_ctx.filter.label),
1
/* TEXT */
)) : createCommentVNode("v-if", true)
])
],
2
/* CLASS */
);
}
var BaseSuggestion = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export { BaseSuggestion as default };
//# sourceMappingURL=base-suggestion.vue.js.map