/* global React */
// Branded bonus covers — layered SVG compositions with CCA wordmark.
// Each cover is a full-bleed visual designed to feel like a product cover.
// Shared corner ticks layer
function CornerTicks() {
return (
{/* Top-left */}
{/* Top-right */}
{/* Bottom-left */}
{/* Bottom-right */}
);
}
// Subtle dotted grid background
function DotGrid() {
return (
);
}
// Base layout shell
function CoverShell({number, label, motif, accent = "default"}) {
return (
{/* Big italic number (right) */}
{number}
{/* Motif (center-left/middle) */}
{motif}
{/* Bottom label */}
{label}
);
}
// ─── Motifs ───
const STROKE = { stroke: "currentColor", fill: "none", strokeWidth: 1, strokeLinecap: "round", strokeLinejoin: "round" };
// 01 — Compass rose (cartographic)
function MotifCompass() {
return (
{/* 8-point rose */}
{/* Tick marks */}
{[...Array(16)].map((_, i) => {
const a = (i * 22.5) * Math.PI / 180;
const r1 = 48, r2 = 52;
return ;
})}
{/* N S E W */}
N
S
O
L
);
}
// 02 — 9-point map (anamnese)
function MotifMap9() {
// 9 nodes positioned in a slight constellation
const nodes = [
[25, 28], [60, 18], [95, 32],
[22, 60], [60, 55], [98, 62],
[30, 92], [62, 88], [92, 92],
];
// Connections
const edges = [
[0,1],[1,2],[0,3],[2,5],[3,4],[4,5],[3,6],[5,8],[6,7],[7,8],[1,4],[4,7]
];
return (
{edges.map(([a,b], i) => (
))}
{nodes.map(([x,y], i) => (
{String(i+1).padStart(2,"0")}
))}
);
}
// 03 — Open planner spread
function MotifPlanner() {
return (
{/* Open book / planner */}
{/* Left page lines */}
{/* Right page: mini calendar */}
{[0,1,2,3,4,5,6].map(i => (
))}
{/* Highlighted day */}
{/* Bottom check items */}
);
}
// 04 — Chat bubbles diagonal
function MotifChat() {
return (
{/* Incoming bubble */}
{/* Outgoing bubble (filled) */}
{/* Incoming small */}
{/* Typing indicator dots */}
);
}
// 05 — Flask with hexagon molecules
function MotifFlask() {
return (
{/* Erlenmeyer flask */}
{/* Liquid */}
{/* Bubbles */}
{/* Hexagon molecules floating */}
{/* Caution mark */}
);
}
// 06 — Community network
function MotifCommunity() {
const nodes = [
{ x: 30, y: 30, r: 9, primary: false },
{ x: 60, y: 18, r: 8, primary: false },
{ x: 92, y: 32, r: 9, primary: false },
{ x: 22, y: 70, r: 8, primary: false },
{ x: 60, y: 62, r: 13, primary: true },
{ x: 96, y: 72, r: 9, primary: false },
{ x: 44, y: 96, r: 7, primary: false },
{ x: 80, y: 98, r: 7, primary: false },
];
const edges = [[0,1],[1,2],[0,4],[1,4],[2,4],[3,4],[5,4],[6,4],[7,4],[0,3],[2,5],[6,7]];
return (
{edges.map(([a,b], i) => (
))}
{nodes.map((n, i) => (
{/* Tiny avatar marks */}
{!n.primary && }
{!n.primary && }
))}
{/* WhatsApp pulse */}
);
}
const MOTIFS = {
compass: ,
grid9: ,
planner: ,
chat: ,
flask: ,
community: ,
};
const LABELS = {
compass: "GPS · BÚSSOLA DE PRESCRIÇÃO",
grid9: "MAPEAMENTO · 9 DIMENSÕES",
planner: "PLANNER · ROTINA EDITÁVEL",
chat: "ATENDIMENTO ONLINE",
flask: "INGREDIENTES · ANÁLISE CRÍTICA",
community: "COMUNIDADE · MENTORIA",
};
const ACCENTS = {
compass: "warm",
grid9: "cool",
planner: "warm",
chat: "deep",
flask: "warm",
community: "cool",
};
function BonusCover({bonus, index}) {
const num = String((index % 6) + 1).padStart(2, "0");
const motif = MOTIFS[bonus.icon] || MOTIFS.compass;
const label = LABELS[bonus.icon] || "BÔNUS CCA";
const accent = ACCENTS[bonus.icon] || "default";
return (
);
}
window.BonusCover = BonusCover;