import { type AttrState, type BlogAttrs, type Breakpoint, type GlobalData, type Module } from '@divi/types'; import { type MaybeImmutableObject } from '@divi/types-external'; /** * Allowed Blog layout display values. */ export type BlogGridLayoutDisplay = 'grid' | 'flex' | 'block'; /** * Resolved Blog grid layout value. */ export type BlogGridLayoutValue = { display?: BlogGridLayoutDisplay; gridColumnCount?: string; flexDirection?: string; }; /** * Parameters for resolving Blog grid layout values. */ export type ResolveBlogGridLayoutParams = { moduleAttrs?: MaybeImmutableObject; fallbackLayoutAttr?: Module.Element.Decoration.Layout.Attributes; breakpoint: Breakpoint.Name; state: AttrState; breakpointNames?: Breakpoint.Names; baseBreakpoint?: Breakpoint.Name; activeModulePreset?: GlobalData.Store.Selectors.GetModulePreset.ReturnValue; preferPresetValues?: boolean; }; /** * Return type for Blog grid layout resolution. */ export type ResolvedBlogGridLayout = { mergedLayoutAttr: Module.Element.Decoration.Layout.Attributes; layoutValue: BlogGridLayoutValue; }; /** * Parameters for useBlogGridLayout hook. */ export type UseBlogGridLayoutParams = { moduleId?: string; moduleAttrs?: MaybeImmutableObject; }; /** * Return type for useBlogGridLayout hook. */ export type UseBlogGridLayoutReturn = { mergedLayoutAttr: Module.Element.Decoration.Layout.Attributes; layoutValue: BlogGridLayoutValue; layoutDisplay: BlogGridLayoutDisplay; gridColumnCount: string; flexDirection: string; }; /** * Parameters for getBlogGridLayoutDisplay helper. */ export type GetBlogGridLayoutDisplayParams = { moduleId?: string; attrs?: MaybeImmutableObject; breakpoint: Breakpoint.Name; state: AttrState; breakpointNames?: Breakpoint.Names; baseBreakpoint?: Breakpoint.Name; };