import { h } from '@stencil/core';
const ResourceAuthorItem = ({ author, byline, singleLine = false, className, key }) => {
    return author ? (h("a", { href: author.link, target: "_blank", rel: "noopener", key: key, class: `
        ${byline ? `resource-author-item--byline` : ''}
        ${singleLine ? `resource-author-item--single-line` : ''}
        ${className ? className : ''}
        resource-author-item
      `, "aria-label": `Author information - ${author.name}` },
        h("div", { class: "resource-author" },
            h("img", { loading: 'lazy', class: "author-avatar", src: author.avatar, alt: author.name }),
            h("div", { class: "author-info" },
                h("div", { class: "author-name" }, author.name),
                author.title ? h("div", { class: "author-title" }, author.title) : null)))) : null;
};
export default ResourceAuthorItem;
