import type {INumberValueTagStyle} from "@/interface/app/ITagStyle.ts";

export class EtagTaskTypeFormatter {

    etagTaskType: INumberValueTagStyle[] = [
        {value: 1, label: '捡货', type: 'success'},
        {value: 2, label: '上架', type: 'primary'},
        {value: 3, label: '盘点', type: 'warning'},
        {value: 4, label: '清点', type: 'info'},
        {value: 5, label: '其他', type: 'danger'},
    ];

    etagTaskTypeFormatter(value: any): INumberValueTagStyle {
        const findResult = this.etagTaskType.find(f => f.value == value);
        if (findResult) {
            return findResult;
        }
        return {value: value, label: '？' + value.toString(), type: 'danger'};
    }
}