';
};
// --- Recommendation Cards ---
App.renderRecommendationCards = function (recommendations, tier) {
var section = document.getElementById('recommendations-section');
var leverOrder = ['ppc', 'listing', 'seo', 'account'];
// Sort by rank
leverOrder.sort(function (a, b) {
return recommendations[a].rank - recommendations[b].rank;
});
var html = '
Growth Recommendations
';
for (var i = 0; i < leverOrder.length; i++) {
var key = leverOrder[i];
var rec = recommendations[key];
var config = App.LEVER_CONFIG[key];
var desc = App.LEVER_DESCRIPTIONS[key][tier];
var fillPct = Math.min(100, (rec.score / 0.75 * 100)).toFixed(0);
var priorityClass = 'priority-' + rec.priority.toLowerCase();
html +=
'
';
section.innerHTML = html;
};
// --- Placeholder Shimmer Tables ---
App.renderPlaceholderTables = function () {
var section = document.getElementById('top3-section');
var tiers = ['A', 'B', 'C'];
var html = '';
for (var t = 0; t < tiers.length; t++) {
var colors = TIER_COLORS[tiers[t]];
html +=
'
Enter your email to see top industry players and detailed analysis
' +
'' +
'
We\'ll send you a copy. Your data is handled per our Privacy Policy.
' +
'
';
};
// --- Top-3 Tables (real data) ---
App.renderTop3Tables = function (topCompanies, userCompany) {
var section = document.getElementById('top3-section');
var tiers = ['A', 'B', 'C'];
var html = '';
for (var t = 0; t < tiers.length; t++) {
var tierKey = tiers[t];
var companies = topCompanies[tierKey] || [];
var colors = TIER_COLORS[tierKey];
html +=
'
' +
'
Segment ' + tierKey + ' — Top Players
' +
'
' +
'
' +
'
' +
'
#
Brand
Revenue
ASINs
YoY Growth
Ad Budget
' +
'
';
for (var r = 0; r < companies.length; r++) {
var c = companies[r];
var isUser = userCompany && c.brand.toLowerCase() === userCompany.toLowerCase();
html +=
'