export const getStatusLoad = (load) => {
    let status;
    let color;
    switch (load.load_status) {
        case 'Published':
            status = "Publicado";
            color = "#000000";
            break;
        case 'Loading':
            color = "#F44336";
            status = "Cargando";
            break;
        case 'Transit':
            status = "En Transito";
            color = "#ffd22b"
            break;
        case 'Downloading':
            status = "Descargando";
            color = "#428502"
            break;
        case 'Delivered':
            status = "Entregado";
            color = "#000000";
            break;
        default:
            status = 'Sin publicar';
            color = "#000000";
            break;
    }
    return {
        status,
        color,
    };
}

export const eventStatusLoad = (loadStatus) => {
    let color;
    let status;
    switch (loadStatus) {
        case 'Published':
            status = "Publicado";
            color = "yellow";
            break;
        case 'Loading':
            color = "green";
            status = "Cargando";
            break;
        case 'Transit':
            status = "En Transito";
            color = "red"
            break;
        case 'Downloading':
            status = "Descargando";
            color = "blue"
            break;
        case 'Delivered':
            color = "blue";
            status = "Entregado";
            break;
        default:
            color = "yellow";
            status = 'Sin publicar';
            break;
    }
    return {
        color, 
        status
    };
}

export const getStatusPublished = (load) => {
    let status;
    switch (load.status) {
        case 'Draft':
            status = "Guardado";
            break;
        case 'Published':
            status = "Publicado";
            break;
        case 'Completed':
            status = "Conectado";
            break;
        case 'Closed':
            status = "Completado";
            break;
        default:
            status = 'Guardado';
            break;
    }
    
    return status;
}

