import { BoxStatus } from '@/data/box/box.model';
import { PartyStatus } from '@/data/party/party.model';

export function getStatusColor(status: BoxStatus | PartyStatus) {
    switch (status) {
        case 'COLLECTING': {
            return '#FD9C2B';
        }
        case 'ARRIVED': {
            return '#08C1C1';
        }
        case 'ON_THE_WAY': {
            return '#00bae7';
        }
        case 'READY_TO_INVOICE': {
            return '#DF2F99';
        }
        case 'READY': {
            return '#3489E4';
        }
        case 'DELIVERED': {
            return '#3489E4';
        }
        case 'IN_CUSTOMS': {
            return '#C9A26E';
        }
        default: {
            return '#17D792';
        }
    }
}

export function getBoxStatusStyles(status: BoxStatus | PartyStatus) {
    let color = getStatusColor(status);

    return {
        padding: '4px 8px',
        color: '#FFF',
        fontSize: '10px',
        fontStyle: 'normal',
        fontWeight: 600,
        lineHeight: '16px',
        backgroundColor: color,
        borderRadius: '4px',
        display: 'inline-flex',
        minWidth: 120,
        justifyContent: 'center',
    } as React.CSSProperties;
}
