import html from 'choo/html'; import { starRating } from '../partials/starRating'; import { modal } from '../partials/modal'; export const resultDetails = (searchController, result) => { const { i18n } = searchController; const modalId = `result_${result.uri}`; const buttonHTML = html``; const modalContent = html`

Covers

${i18n.__('interaction.average_rating')}

${starRating(result.rating)}
{{USERNAME}} ${starRating(Math.ceil(result.rating))}

The only thing worse than yellow snow is green snow. Let's put a touch more of the magic here. With practice comes confidence. You have to allow the paint to break to make it beautiful.

Let all these little things happen. Don't fight them. Learn to use them. Imagination is the key to painting. You can't make a mistake. Anything that happens you can learn to use - and make something beautiful out of it. This is a fantastic little painting. In painting, you have unlimited power. You have the ability to move mountains. We don't have anything but happy trees here.

If what you're doing doesn't make you happy - you're doing the wrong thing. A fan brush can be your best friend. Mountains are so simple, they're hard.

${result.reviewCount}

${i18n.__('search.see_book_details')}

`; return modal(modalId, searchController, modalContent, { styles: "width:90%;", buttonHTML, // This should be replaced with buttonHTML containing the ratings and number of reviews etc. headerText: result.name, }); }