// eslint-disable-next-line no-unused-vars class DownloadModal extends React.Component { componentDidMount() { if (this._modal) { new Foundation.Reveal($(this._modal)); } } downloadsByCategories(downloads) { if (downloads.length < 2) return null; return `
  • ${downloads[0]} ${ _.map(downloads[1], item => this.download(item)).join('\n') }
  • `; } download(download) { if (!download) return; const indent = download.indent ? 'u-li-indent' : ''; const cls = `ub-icon fa-lg file-${download.icon} ${indent}`; const preview = (download.icon === 'pdf') ? ` ` : ''; return `
  • ${preview} ${download.title}
  • `; } modalContentData() { const resource = this.props.resource; return `
    Download ${_.capitalize(resource.type.name)}
    `; } modalContent() { return { __html: this.modalContentData() }; } render() { const resource = this.props.resource; const modalId = `downloads-modal-${resource.id}`; return (resource.downloads && resource.downloads.length > 0) ? (
    this._modal = ref} id={modalId} dangerouslySetInnerHTML={ this.modalContent() }>
    ) :
    ; } }