'use strict';

export default {
    modelId: 'B163',
    name: 'Buds Pro',
    pattern: /^.*Buds Pro$/,

    batteryLR: true,
    batteryCase: true,

    eqPreset: {
        balanced: 0x00,
        voice: 0x01,
        more_treble: 0x02,
        more_bass: 0x03,
        custom: 0x05,
    },

    noiseControl: {
        off: {byte: 0x05},
        transparency: {byte: 0x07},
        noiseCancellation: {
            levels: {
                high: 0x01,
                mid: 0x02,
                low: 0x03,
            },
        },
    },

    inEarDetection: true,
    lowLatencyMode: true,
    ring: true,
    dualConnection: false,
    dualConnectionReboot: false,

    gestureOptions: {
        default: '080201020902010308020107160201090103010209030103080301071603010901',
        slots: [
            {group: 'left',  device: 0x02, buttonId: 0x01, type: 'double'},
            {group: 'left',  device: 0x02, buttonId: 0x01, type: 'triple'},
            {group: 'left',  device: 0x02, buttonId: 0x01, type: 'action-hold'},
            {group: 'left',  device: 0x02, buttonId: 0x01, type: 'double-action-hold'},
            {group: 'right',  device: 0x03, buttonId: 0x01, type: 'double'},
            {group: 'right',  device: 0x03, buttonId: 0x01, type: 'triple'},
            {group: 'right',  device: 0x03, buttonId: 0x01, type: 'action-hold'},
            {group: 'right',  device: 0x03, buttonId: 0x01, type: 'double-action-hold'},
        ],
        mapping: {
            gestureTypes: {
                'double': 0x02,
                'triple': 0x03,
                'action-hold': 0x07,
                'double-action-hold': 0x09,
            },
            actions: {
                'no-action': [0x01],
                'play-pause': [0x02],
                'skip-back': [0x08],
                'skip-forward': [0x09],
                'voice-assistant': [0x0B],
                'volume-up': [0x12],
                'volume-down': [0x13],
                'noise-control': [0x0A, 0x14, 0x15, 0x16],
            },
        },
        gestures: {
            'double': {
                type: 'tap',
                actions: [
                    'play-pause',
                    'skip-back',
                    'skip-forward',
                    'voice-assistant',
                ],
            },
            'triple': {
                type: 'tap',
                actions: [
                    'skip-back',
                    'skip-forward',
                    'voice-assistant',
                ],
            },
            'action-hold': {
                type: 'tap',
                actions: [
                    'noise-control',
                    'voice-assistant',
                ],
            },
            'double-action-hold': {
                type: 'tap',
                actions: [
                    'volume-up',
                    'volume-down',
                    'voice-assistant',
                    'no-action',
                ],
            },
        },
        noiseControlModes: ['off', 'transparency', 'noise-cancellation'],
    },

    albumArtIcon: 'earbuds-stem',
    budsIcon: 'earbuds-stem',
    case: 'case-round',
};

