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

const pending = {color:"#f5a83d", eng:"Pending", cht:"待辦"}
const toBePaid = {color:"#f5a83d", eng:"To be paid", cht:"待支付"}
const paid = {color:"#22a13f", eng:"Paid", cht:"已付費"}

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

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

function getStatus(params) {
    let status = params?.row?params.row.status:params;

    if(status =="pending") return pending;
    if(status == "to be paid") return toBePaid;
    if(status =="paid") return paid;
}

