import React, {Component} from 'react';
import InstallationSchedulingForPackages from './components/installationScheduling/InstallationSchedulingForPackages.jsx';

class InstallationSchedulingContainer extends Component {
    render() {
        const {orderPackages, areComponentsDisabled, isInstallationSet, isInstallationInPackage, areAllShippingDatesConfirmed} = this.props.params;

        return (
            <span>
                {orderPackages &&
                    orderPackages.map(orderPackage =>
                        <InstallationSchedulingForPackages key={orderPackage.idPackage}
                            orderPackage={orderPackage}
                            areComponentsDisabled={areComponentsDisabled}
                            isInstallationSet={isInstallationSet}
                            isInstallationInPackage={isInstallationInPackage}
                            areAllShippingDatesConfirmed={areAllShippingDatesConfirmed}
                            noOfPackages={orderPackages.length}/>)
                }
            </span>

        );
    }
}

export default InstallationSchedulingContainer;
