/** * Sidebar layout cards — a radio group of option cards, each showing a mini * column diagram (browser-mockup thumbnail) instead of a lucide icon, so the * position choices (No Sidebar / Left / Right / Both) read at a glance * rather than needing a description. Purpose-built for the Sidebar section's * "Default Layout" control — the diagram shape is derived from the option's * `value`, which only ever has this one caller's four positions. */ export interface SidebarLayoutOption { value: 'none' | 'left' | 'right' | 'both'; label: string; } interface SidebarLayoutCardsProps { label?: string; value: string; options: SidebarLayoutOption[]; onChange: ( value: string ) => void; } /** * The thumbnail's column strip, main-content-first (left→right, DOM order). * * @param value The position value ('none' | 'left' | 'right' | 'both'). */ function columnsFor( value: string ): Array< 'main' | 'sidebar' > { switch ( value ) { case 'left': return [ 'sidebar', 'main' ]; case 'right': return [ 'main', 'sidebar' ]; case 'both': return [ 'sidebar', 'main', 'sidebar' ]; default: return [ 'main' ]; } } export default function SidebarLayoutCards( { label, value, options, onChange, }: SidebarLayoutCardsProps ) { return (