import * as UiKit from '@rocket.chat/ui-kit' ; import React , { ComponentType , ReactElement } from 'react' ; export const createSurfaceRenderer = < S extends UiKit . SurfaceRenderer < ReactElement > > ( SurfaceComponent , surfaceRenderer ) => function Surface ( blocks , conditions = { } ) : ReactElement { return ( < SurfaceComponent > { surfaceRenderer . render ( blocks , { engine : 'rocket.chat' , ... conditions , } ) } < /SurfaceComponent>); } ;