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

/**
 * LED 颜色类型
 */
export default class LedColorTypeFormatter {

    ledColorType: INumberValueTagStyle[] = [
        {value: 1, label: '单色', type: 'primary'},
        {value: 2, label: '双色', type: 'success'},
        {value: 3, label: '三色/多色', type: 'warning'},
    ];

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