import { STEP_LABELS } from '../utils/constants.js'; const LogoSvg = () => ( ); const CheckSvg = () => ( ); export default function Header({ step, onNav, sub }) { return (
Dabur Analytics / {sub}
{STEP_LABELS.map((label, i) => { const n = i + 1; const isDone = n < step; const isActive = n === step; const isPend = n > step; const cls = isDone ? 'stp done' + (n < step ? ' clickable' : '') : isActive ? 'stp active' : 'stp pend'; return ( <>
isDone && onNav(n)} title={isDone ? `Go back to ${label}` : undefined} >
{isDone ? : n}
{label}
{n < STEP_LABELS.length && (
)} ); })}
Step {step} of 7
); }