/* eslint-disable no-undef */

/**
 * @return {string}
 */

export default {
  onChange: ({value,colInfo,getFieldValue,setFieldVisible,setFieldValue,setFieldEditable}) => {
    if(colInfo.FIELD_NAME=='IS_STOP'){
      setFieldVisible('STOP_START_TIME',value);
      setFieldVisible('STOP_END_TIME',value);
    }
  },
  onBeforeEdit:({isNew,stateData,login,getFieldValue,setFieldValue,setFieldValueByBatch,setFieldEditable,setFieldVisible})=>{
   
    if(stateData && stateData.IS_STOP){
      setFieldVisible('STOP_START_TIME',stateData.IS_STOP);
      setFieldVisible('STOP_END_TIME',stateData.IS_STOP);
    }
    else
    {
      setFieldVisible('STOP_START_TIME',false);
      setFieldVisible('STOP_END_TIME',false);
    }
  },
}
