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

export class StockScanTypeFormatter {

    scanType: INumberValueTagStyle[] = [
        {value: 0, label: 'PLC 转发', type: 'primary'},
        {value: 1, label: 'TCP 直连', type: 'success'}
    ];

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