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

export default class EtagTagTypeFormatter {

    etagTagType: INumberValueTagStyle[] = [
        {value: 1, label: '3位数字带按钮', type: 'warning'},
        {value: 2, label: '7位数字带按钮', type: 'primary'},
        {value: 3, label: '扫描枪', type: 'info'},
        {value: 4, label: '单色灯', type: 'success'},
        {value: 5, label: '12位数字英文带按钮', type: 'warning'},
        {value: 6, label: '12位数字中文带按钮', type: 'primary'},
    ];

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