import {getStatusTag} from "utils/statusUtils/Base";

const APPR = {color:"#22a13f", eng:"Success", cht:"成功"}
const REJT = {color:"#d9372b", eng:"Reject", cht:"拒絕"}
const CANC = {color:"#8a8784", eng:"Cancelled", cht:"取消"}
const INPR = {color:"#f5a83d", eng:"In Progress", cht:"進行中"}

export function getStatus_Cht(params) {
    let status = getStatus(params);
    return getStatusTag({color: status.color, text:status.cht })
}

export function getStatus_Eng(params) {
    let status = getStatus(params);
    return getStatusTag({color: status.color, text:status.eng })
}

function getStatus(params) {
    let status = params?.row?params.row.status:params;
    if(status == "APPR") return APPR;
    if(status == "REJT") return REJT;
    if(status == "CANC") return CANC;
    if(status == "INPR") return INPR;
    return CANC;
}

