export const mode = "mode4";
export const deviceName = "2GD.OPET";
export const serialNumber = "ALS124123";
export const delay = 30;

export const availableMode = [
    {value: '0', name: 'OFF'},
    {value: '1', name: 'ON'},
    {value: '2', name: '1'},
    {value: '3', name: '2'},
    {value: '4', name: '3'},
    {value: '5', name: '4'},
    {value: '6', name: '5'},
    {value: '7', name: '6'},
    {value: '8', name: '7'},
    {value: '9', name: '8'},
    {value: '10', name: '9'},
    {value: '11', name: '10'},
    {value: '12', name: '11'},
    {value: '13', name: '12'},
    {value: '14', name: '13'},
    {value: '15', name: '14'},
]

export function findModeNameByValue(value: string) {
  const foundMode = availableMode.find(item => item.value === value);
  return foundMode ? foundMode.name : null;
}