import React from 'react';
import { useRegionalizationContext } from '../context/RegionalizationContext';
import { PostalCodeInputScreen } from './PostalCodeInputScreen';
import { MoreInfosScreen } from './MoreInfosScreen';
import { ConfirmScreen } from './ConfirmScreen';
import { AllStoresScreen } from './AllStoresScreen';

export const ViewsContainer = () => {
  const { view } = useRegionalizationContext();

  return (
    <div className="regionalization-container">
      {view === 'PostalCodeInputScreen' && <PostalCodeInputScreen />}
      {view === 'MoreInfosScreen' && <MoreInfosScreen />}
      {view === 'AllStoresScreen' && <AllStoresScreen />}
      {view === 'ConfirmScreen' && <ConfirmScreen />}
    </div>
  );
};
