import { 
  requireNativeComponent, 
} from 'react-native';

import React, { 
  
} from 'react';

import { 
  BlazeBaseGridWidgetViewProps,
  BlazeBaseMomentsWidgetViewProps,
  BlazeBaseWidgetViewProps, 
  BlazeSdkBaseWidgetViewProps
} from './BlazeBaseWidgetViewProps';

import { 
  BlazeBaseWidgetView, 
} from './BlazeBaseWidgetComponent';

export interface BlazeMomentsGridViewProps 
  extends BlazeBaseWidgetViewProps,
          BlazeBaseGridWidgetViewProps,
          BlazeBaseMomentsWidgetViewProps {

}

interface BlazeSdkMomentsGridViewNativeProps 
  extends BlazeMomentsGridViewProps, 
          BlazeSdkBaseWidgetViewProps {

}

export const BLAZE_MOMENTS_GRID_COMPONENT = 'RTNBlazeMomentsGridView';

export class BlazeMomentsGridView extends BlazeBaseWidgetView<BlazeMomentsGridViewProps> {

  protected getComponentName(): string {
    return BLAZE_MOMENTS_GRID_COMPONENT
  }

  render() {
    return (
      <MomentsGridViewManager
      {...this.props}
      {...this.createBaseProps()}
      ref={(ref) => {
        if (ref) this.ref = ref;
      }}
    />
    );
  }
}

const MomentsGridViewManager = requireNativeComponent<BlazeSdkMomentsGridViewNativeProps>(
  BLAZE_MOMENTS_GRID_COMPONENT,
);
