import React from 'react';
import { Provider } from 'react-redux';
import Booking from './features/booking/booking';
import SettingsContext from './settings-context';
import { store } from './store';
import { Settings } from './types';

interface BookingWizardProps {
  productCode: string;
  productName: string;
  allotmentName?: string;
  tourCode?: string;
  thumbnailUrl?: string;
  settings: Settings;
}

const BookingWizard: React.FC<BookingWizardProps> = ({ productCode, productName, thumbnailUrl, settings }) => {
  return (
    <SettingsContext.Provider value={settings}>
      <Provider store={store}>
        <Booking productCode={productCode} productName={productName} thumbnailUrl={thumbnailUrl} />
      </Provider>
    </SettingsContext.Provider>
  );
};

export default BookingWizard;
