/* global registerGlobalBackward, DataProviderFacade, BackwardUtility */

registerGlobalBackward('3.1.16', function (theme) {
    'use strict';

    if (theme.constructorName !== 'Theme') return theme;

    if (DataProviderFacade.getCmsInfo().cmsName === 'PrestaShop') {
        theme.prototypes.themeConfigurator = BackwardUtility.getControlObject('ThemeConfigurator');
        theme.prototypes.facebookBlock = BackwardUtility.getControlObject('FacebookBlock');
    }

    return theme;
});
