import React from 'react'; import { Box } from '@mui/material'; import { tabPanelStyles } from '../theme'; export default function TabPanel({ children, value, index, keepMounted = false, ...other }) { const isActive = value === index; // keepMounted: render children unconditionally and toggle visibility via CSS, // so component state, audio nodes, and decoded buffers survive tab switches. // Use sparingly — by default we still mount/unmount so inactive tabs cost // nothing at idle. if (keepMounted) { return (