import { RtTheme } from '../rt-frame.types'; export function computeThemeValue(theme: RtTheme): Exclude { if (theme !== 'auto') return theme; if (typeof window === 'undefined' || typeof window.matchMedia === 'undefined') return 'light'; return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; }