---
import { FRAMEWORK_STYLES, getDefaultStyle, SUPPORTED_FRAMEWORKS } from '@/types/docs';
const STYLE_KEY_PREFIX = 'vjs_docs_style_';
// Derive values from the single source of truth (FRAMEWORK_STYLES)
// Pass as plain objects since define:vars serializes to JSON
const frameworkStylesConfig = Object.fromEntries(SUPPORTED_FRAMEWORKS.map((fw) => [fw, [...FRAMEWORK_STYLES[fw]]]));
const defaultStyleConfig = getDefaultStyle(SUPPORTED_FRAMEWORKS[0]);
// Collect all unique styles across all frameworks for CSS generation
const allStyles = [...new Set(Object.values(FRAMEWORK_STYLES).flat())];
---
{/* Style visibility CSS rules - generated from FRAMEWORK_STYLES to stay in sync */}
{/*
Style initialization script - runs before paint to prevent FOUC.
Supports ?style= query param for deep-linking (e.g., ?style=tailwind).
This allows external links to specify a style preference. The style is
validated against valid styles for the current framework and persisted
to localStorage.
*/}