import React from 'react';
import Product from './components/product';
import SettingsContext from './settings-context';
import { Settings } from './types';

interface BookingProductProps {
  productCode: string;
  productName: string;
  rating?: number;
  settings: Settings;
}

const BookingProduct: React.FC<BookingProductProps> = ({ productCode, productName, rating, settings }) => {
  return (
    <SettingsContext.Provider value={settings}>
      <Product productCode={productCode} productName={productName} rating={rating}></Product>
    </SettingsContext.Provider>
  );
};

export default BookingProduct;
