import React from 'react';
import { ActivityProvider } from '../context/ActivityContext';
import { ActivityContainerProps } from '../types';

const ActivityContainer = ({
  activityCode,
  children,
  className = 'activity-container',
  presetMissionApiService,
  presetActivityInfo,
  ...rest
}: ActivityContainerProps): React.ReactElement => {
  return (
    <ActivityProvider
      activityCode={activityCode}
      presetMissionApiService={presetMissionApiService}
      presetActivityInfo={presetActivityInfo}>
      <div
        className={className}
        {...rest}
      >
        {children}
      </div>
    </ActivityProvider>
  );
};

export default ActivityContainer; 