ag: "span", classList: ["urlbarView-yelpRealtime-description-popularity"], }, ]; } getViewUpdateForPayloadItem(item, index) { return { [`item_${index}`]: { attributes: { state: item.business_hours[0].is_open_now ? "open" : "closed", }, }, [`image_${index}`]: { attributes: { src: item.image_url, }, }, [`title_${index}`]: { textContent: item.name, }, [`address_${index}`]: { textContent: item.address, }, [`pricing_${index}`]: { textContent: item.pricing, }, [`business_hours_${index}`]: { l10n: { id: item.business_hours[0].is_open_now ? "urlbar-result-yelp-realtime-business-hours-open" : "urlbar-result-yelp-realtime-business-hours-closed", args: { // TODO: Need to pass "time until keeping the status" after resolving // the timezone issue. timeUntil: new Intl.DateTimeFormat(undefined, { hour: "numeric", }).format(new Date()), }, parseMarkup: true, }, }, [`popularity_${index}`]: { l10n: { id: "urlbar-result-yelp-realtime-popularity", args: { rating: item.rating, review_count: item.review_count, }, }, }, }; } } PK