export function controlPropConditionalMapping ( instance , propertyName , columns ) { if ( instance ) { if ( ! instance . conditionalValidationProps ) instance . conditionalValidationProps = { } ; columns . forEach ( t => { if ( t . propName && ! t . objectPropName ) { if ( ! instance . conditionalValidationProps [ t . propName ] ) instance . conditionalValidationProps [ t . propName ] = [ ] ; if ( instance . conditionalValidationProps [ t . propName ] . indexOf ( propertyName ) == - 1 ) instance . conditionalValidationProps [ t . propName ] . push ( propertyName ) ; } else { if ( t . propName && t . objectPropName ) { if ( ! instance . conditionalObjectProps ) instance . conditionalObjectProps = [ ] ; t . referencePropName = propertyName ; instance . conditionalObjectProps . push ( t ) ; } } } ) ; } }