/* global registerGlobalBackward, DataProviderFacade */

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

    if (DataProviderFacade.getCmsInfo().cmsName === 'PrestaShop') {
        if (!theme.prototypes.Currency) {
            theme.prototypes.Currency = {
                dropdowns: {
                    showArrow: true,
                    showLabel: false,
                    textType: "short",
                    constructorName: "Dropdowns",
                    packageData: {
                        "name": "Common",
                        "version": "1.16.13",
                        "id": 0
                    }
                },
                constructorName: "Currency",
                packageData: {
                    name: "Components",
                    version: "1.15.20",
                    id: 0
                }
            };
        }
        if (!theme.prototypes.Language) {
            theme.prototypes.Language = {
                dropdowns: {
                    showArrow: true,
                    showLabel: false,
                    textType: "short",
                    constructorName: "Dropdowns",
                    packageData: {
                        "name": "Common",
                        "version": "1.16.13",
                        "id": 0
                    }
                },
                constructorName: "Language",
                packageData: {
                    name: "Components",
                    version: "1.15.20",
                    id: 0
                }
            };
        }
    }
    return theme;
});