import React from 'react'; import { ReactNode } from '@wordpress/element'; interface ProrankHeaderProps { title: string; description?: string; subtitle?: string; badges?: Array<{ label: string; variant?: string } | string>; children?: ReactNode; } /** * Unified header component with premium blue gradient and animated orange accent bar. */ const ProrankHeader: React.FC = ({ title, description, subtitle, badges, children }) => { const headerText = subtitle || description; const normalizedBadges = Array.isArray(badges) ? badges .map((badge) => { if (typeof badge === 'string') { return { label: badge }; } return badge || null; }) .filter(Boolean) : []; return (
{/* Orange accent bar with pulse animation */}
{/* Moving wave effect on top of accent bar */}

{title}

{headerText &&

{headerText}

} {normalizedBadges.length > 0 && (
{normalizedBadges.map((badge, index) => ( {badge.label} ))}
)}
{children && (
{children}
)}
); }; export default ProrankHeader;