function t(t){return t.isFuture?{text:"等待中...",type:"info"}:"agree"===t.taskResult?{text:"已同意",type:"success"}:"refuse"===t.taskResult?{text:"已拒绝",type:"error"}:"transfer"===t.taskResult?{text:"已转交",type:"primary"}:"recall"===t.taskResult?{text:"已退回",type:"warning"}:!t.taskResult&&t.finishTime?{text:"已取消",type:"default"}:{text:"处理中",type:"primary"}}function e(t){switch(t){case"RUNNING":return{text:"进行中",type:"primary"};case"COMPLETE":return{text:"已结束",type:"primary"};case"PASS":return{text:"审批通过",type:"success"};case"CANCEL":return{text:"已撤销",type:"default"};case"REFUSE":return{text:"审批驳回",type:"error"};default:return{text:"未知状态",type:"default"}}}function r(t){return t&&("CONDITIONS"===t.type||"CONCURRENTS"===t.type||"INCLUSIVES"===t.type)}function n(t){return t&&"EMPTY"===t.type}function u(t,e){if(r(t)){if(e(t))return;t.branchs.map((t=>{e(t)||u(t.children,e)})),u(t.children,e)}else if(function(t){return t&&t.type&&!(r(t)||n(t))}(t)||n(t)||function(t){return t&&("CONDITION"===t.type||"CONCURRENT"===t.type||"INCLUSIVE"===t.type)}(t)){if(e(t))return;u(t.children,e)}}export{t as a,u as f,e as g};
