/* global registerGlobalBackward, DataProviderFacade */

registerGlobalBackward('1.13.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 === 'DrupalRegion' &&
                control.controls[controls[i]].LayoutPosition) {
                var layoutPosition = control.controls[controls[i]].LayoutPosition;
                layoutPosition.css = layoutPosition.css || {};
                layoutPosition.css['min-height'] = layoutPosition.css['min-height'] || '25px';
            }
        }
    }

    return control;
});