import { h } from './index-b7735e0d.js';

const renderReference = (field, data, meta) => {
  var _a;
  const imageSrc = field.imageField ? data[field.imageField] : undefined;
  const initialLetters = field.titleField
    ? (_a = data[field.titleField]) === null || _a === void 0 ? void 0 : _a.split(' ').map(word => word[0]).join('')
    : undefined;
  return (h("abbr", { title: data[field.titleField] },
    h("dvn-image", { bordered: true, leanedVertically: true, src: imageSrc, text: initialLetters, shape: meta === null || meta === void 0 ? void 0 : meta.imageShape })));
};

export { renderReference as r };
