import { FiltersMap } from '@wix/bex-core'; import { GridBaseState, gridSizePresets, GridState, ToolbarCollectionState, topGridSizePreset, } from '../../state'; import { GridContent, GridContentBaseProps } from './GridContent'; import React, { useState } from 'react'; export interface GridSingleGridContentProps extends GridContentBaseProps { state: GridState; range?: { start: number; length: number }; } export function GridSingleGridContent( props: GridSingleGridContentProps, ) { const { range, imagePlacement, state: parentState, layoutType, dragAndDrop, } = props; const { toolbar, collection } = parentState; const [state] = useState( () => new GridBaseState({ container: toolbar.container, toolbar: toolbar as ToolbarCollectionState>, collection, sizePreset: imagePlacement ? gridSizePresets[imagePlacement] : topGridSizePreset, range, parentState, layoutType, draggable: dragAndDrop ? 'draggable' : 'none', }), ); return ( ); }