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

export default class PlcTypeFormatter {

    plcTypeTagStyle: INumberValueTagStyle[] = [
        {value: 1, label: '西门子S7', type: 'primary'},
    ];

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