import { Type_PanelMode } from './PanelManager'; import { Type_JSON } from './Utils'; /** Visibilité d'un bloc dans chacun des trois contenants. */ export type Type_BlockVisibility = { [mode in Type_PanelMode]: boolean; }; /** Une entrée de composition : un bloc, sa visibilité, ses réglages propres. */ export type Type_CompositionEntry = { /** Identifiant du bloc au catalogue. */ block: string; show: Type_BlockVisibility; /** Réglages propres au bloc — opaques ici, interprétés par le bloc. */ options?: { [key: string]: unknown; }; }; /** Composition = liste ORDONNÉE d'entrées (l'ordre est l'ordre d'affichage). */ export type Type_Composition = Type_CompositionEntry[]; /** Un bloc est visible partout par défaut (absent = visible, comme TooltipBlocks). */ export declare const DEFAULT_BLOCK_VISIBILITY: Type_BlockVisibility; export declare const MAX_COMPOSITION_ENTRIES = 100; /** Lit une visibilité depuis du JSON quelconque (champs manquants = défaut). */ export declare const blockVisibilityFromJSON: (raw: unknown) => Type_BlockVisibility; /** Lit une composition depuis du JSON quelconque. Ne jette jamais. */ export declare const compositionFromJSON: (raw: unknown) => Type_Composition; /** Sérialise une composition (forme stable, sans champ vide superflu). */ export declare const compositionToJSON: (composition: Type_Composition) => Type_JSON[]; /** Un bloc est-il visible dans ce contenant ? */ export declare const isBlockVisibleIn: (entry: Type_CompositionEntry, mode: Type_PanelMode) => boolean; /** Blocs à afficher dans un contenant, DANS L'ORDRE de la composition. */ export declare const blocksFor: (composition: Type_Composition, mode: Type_PanelMode) => Type_Composition; /** La cible a-t-elle quelque chose à montrer dans ce contenant ? */ export declare const hasContentFor: (composition: Type_Composition, mode: Type_PanelMode) => boolean;