UNPKG

@empathyco/x-components

Version:
48 lines (45 loc) 1.7 kB
import _sfc_main from './next-query-preview.vue2.js'; import { openBlock, createElementBlock, renderSlot, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from 'vue'; import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js'; const _hoisted_1 = { key: 0, "data-test": "next-query-preview", class: "x-next-query-preview" }; const _hoisted_2 = { "data-test": "result-name" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.suggestionResults ? (openBlock(), createElementBlock("ul", _hoisted_1, [ renderSlot(_ctx.$slots, "default", { suggestion: _ctx.suggestion, results: _ctx.suggestionResults.items, totalResults: _ctx.suggestionResults.totalResults }, () => [ (openBlock(true), createElementBlock( Fragment, null, renderList(_ctx.suggestionResults.items, (result) => { return openBlock(), createElementBlock("li", { key: result.id, class: "x-next-query-preview__item", "data-test": "next-query-preview-item" }, [ renderSlot(_ctx.$slots, "result", { result }, () => [ createElementVNode( "span", _hoisted_2, toDisplayString(result.name), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : createCommentVNode("v-if", true); } var nextQueryPreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { nextQueryPreview as default }; //# sourceMappingURL=next-query-preview.vue.js.map