/** * One Performance tab (Caching / Uploads), mounted on its own — * the Customizer host gives each a real native section of its own * (`aureon_performance_{key}`), reached from the Performance hub's own row * for it (see `onNavigateTab` in `index.tsx`). Same fields, same store as the * hub's own inline `TabPanel` for this key — only the navigation differs. */ import { __ } from '@wordpress/i18n'; import { CachingFields, UploadsFields, type PerformanceSchema } from './fields'; import type { WorkingSettings, SetPath, SectionExtra } from '../../types'; const LABELS: Record< string, string > = { caching: __( 'Caching', 'aureon' ), uploads: __( 'Uploads', 'aureon' ), }; interface PerformanceTabSectionProps { schema?: PerformanceSchema; working: WorkingSettings; setPath: SetPath; extras?: SectionExtra[]; tabKey: string; } export default function PerformanceTabSection( { schema, working, setPath, extras, tabKey, }: PerformanceTabSectionProps ) { if ( ! schema ) { return null; } const performance = ( working?.performance ?? {} ) as Record< string, unknown >; return (

{ LABELS[ tabKey ] ?? tabKey }

{ 'caching' === tabKey && ( ) } { 'uploads' === tabKey && }
); }