/* global registerGlobalBackward, DataProviderFacade */

registerGlobalBackward('1.3.4', function (control) {
    'use strict';

    if (DataProviderFacade.getCmsInfo().cmsName === 'Drupal') {
        var controls = Object.keys(control.controls);
        for (var i = 0; i < controls.length; i++) {
            if (control.controls[controls[i]].constructorName === 'TypeSelector') {
                delete control.controls[controls[i]];
            }
        }
    }

    return control;
});