<?php

$shortcuts = [
    [
        'label' => 'backspace',
        'value' => 'backspace',
    ], [
        'label' => 'tab',
        'value' => 'tab',
    ], [
        'label' => 'enter',
        'value' => 'enter',
    ], [
        'label' => 'shift',
        'value' => 'shift',
    ], [
        'label' => 'ctrl',
        'value' => 'ctrl',
    ], [
        'label' => 'alt',
        'value' => 'alt',
    ], [
        'label' => 'pause',
        'value' => 'pause',
    ], [
        'label' => 'capital',
        'value' => 'capital',
    ], [
        'label' => 'escape',
        'value' => 'escape',
    ], [
        'label' => 'pageup',
        'value' => 'pageup',
    ], [
        'label' => 'pagedown',
        'value' => 'pagedown',
    ], [
        'label' => 'end',
        'value' => 'end',
    ], [
        'label' => 'home',
        'value' => 'home',
    ], [
        'label' => 'left',
        'value' => 'left',
    ], [
        'label' => 'up',
        'value' => 'up',
    ], [
        'label' => 'right',
        'value' => 'right',
    ], [
        'label' => 'down',
        'value' => 'down',
    ], [
        'label' => 'insert',
        'value' => 'insert',
    ], [
        'label' => 'delete',
        'value' => 'delete',
    ], [
        'label' => '0',
        'value' => '0',
    ], [
        'label' => '1',
        'value' => '1',
    ], [
        'label' => '2',
        'value' => '2',
    ], [
        'label' => '3',
        'value' => '3',
    ], [
        'label' => '4',
        'value' => '4',
    ], [
        'label' => '5',
        'value' => '5',
    ], [
        'label' => '6',
        'value' => '6',
    ], [
        'label' => '7',
        'value' => '7',
    ], [
        'label' => '8',
        'value' => '8',
    ], [
        'label' => '9',
        'value' => '9',
    ], [
        'label' => 'a',
        'value' => 'a',
    ], [
        'label' => 'b',
        'value' => 'b',
    ], [
        'label' => 'c',
        'value' => 'c',
    ], [
        'label' => 'd',
        'value' => 'd',
    ], [
        'label' => 'e',
        'value' => 'e',
    ], [
        'label' => 'f',
        'value' => 'f',
    ], [
        'label' => 'g',
        'value' => 'g',
    ], [
        'label' => 'h',
        'value' => 'h',
    ], [
        'label' => 'i',
        'value' => 'i',
    ], [
        'label' => 'j',
        'value' => 'j',
    ], [
        'label' => 'k',
        'value' => 'k',
    ], [
        'label' => 'l',
        'value' => 'l',
    ], [
        'label' => 'm',
        'value' => 'm',
    ], [
        'label' => 'n',
        'value' => 'n',
    ], [
        'label' => 'o',
        'value' => 'o',
    ], [
        'label' => 'p',
        'value' => 'p',
    ], [
        'label' => 'q',
        'value' => 'q',
    ], [
        'label' => 'r',
        'value' => 'r',
    ], [
        'label' => 's',
        'value' => 's',
    ], [
        'label' => 't',
        'value' => 't',
    ], [
        'label' => 'u',
        'value' => 'u',
    ], [
        'label' => 'v',
        'value' => 'v',
    ], [
        'label' => 'w',
        'value' => 'w',
    ], [
        'label' => 'x',
        'value' => 'x',
    ], [
        'label' => 'y',
        'value' => 'y',
    ], [
        'label' => 'z',
        'value' => 'z',
    ], [
        'label' => 'num_0',
        'value' => 'num_0',
    ], [
        'label' => 'num_1',
        'value' => 'num_1',
    ], [
        'label' => 'num_2',
        'value' => 'num_2',
    ], [
        'label' => 'num_3',
        'value' => 'num_3',
    ], [
        'label' => 'num_4',
        'value' => 'num_4',
    ], [
        'label' => 'num_5',
        'value' => 'num_5',
    ], [
        'label' => 'num_6',
        'value' => 'num_6',
    ], [
        'label' => 'num_7',
        'value' => 'num_7',
    ], [
        'label' => 'num_8',
        'value' => 'num_8',
    ], [
        'label' => 'num_9',
        'value' => 'num_9',
    ], [
        'label' => 'num_multiply',
        'value' => 'num_multiply',
    ], [
        'label' => 'num_add',
        'value' => 'num_add',
    ], [
        'label' => 'num_enter',
        'value' => 'num_enter',
    ], [
        'label' => 'num_subtract',
        'value' => 'num_subtract',
    ], [
        'label' => 'num_decimal',
        'value' => 'num_decimal',
    ], [
        'label' => 'num_divide',
        'value' => 'num_divide',
    ], [
        'label' => '⌘',
        'value' => '⌘',
    ], [
        'label' => 'f1',
        'value' => 'f1',
    ], [
        'label' => 'f2',
        'value' => 'f2',
    ], [
        'label' => 'f3',
        'value' => 'f3',
    ], [
        'label' => 'f4',
        'value' => 'f4',
    ], [
        'label' => 'f5',
        'value' => 'f5',
    ], [
        'label' => 'f6',
        'value' => 'f6',
    ], [
        'label' => 'f7',
        'value' => 'f7',
    ], [
        'label' => 'f8',
        'value' => 'f8',
    ], [
        'label' => 'f9',
        'value' => 'f9',
    ], [
        'label' => 'f10',
        'value' => 'f10',
    ], [
        'label' => 'f11',
        'value' => 'f11',
    ], [
        'label' => 'f12',
        'value' => 'f12',
    ],
];

return [
    'label' => __( 'Keyboard Shortcuts' ),
    'fields' => [
        [
            'name' => 'ns_pos_keyboard_cancel_order',
            'value' => ns()->option->get( 'ns_pos_keyboard_cancel_order', [] ),
            'label' => __( 'Cancel Order' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to cancel the current order.' ),
        ], [
            'name' => 'ns_pos_keyboard_hold_order',
            'value' => ns()->option->get( 'ns_pos_keyboard_hold_order', [] ),
            'label' => __( 'Hold Order' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to hold the current order.' ),
        ], [
            'name' => 'ns_pos_keyboard_create_customer',
            'value' => ns()->option->get( 'ns_pos_keyboard_create_customer', [] ),
            'label' => __( 'Create Customer' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to create a customer.' ),
        ], [
            'name' => 'ns_pos_keyboard_payment',
            'value' => ns()->option->get( 'ns_pos_keyboard_payment', [] ),
            'label' => __( 'Proceed Payment' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to proceed to the payment.' ),
        ], [
            'name' => 'ns_pos_keyboard_shipping',
            'value' => ns()->option->get( 'ns_pos_keyboard_shipping', [] ),
            'label' => __( 'Open Shipping' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to define shipping details.' ),
        ], [
            'name' => 'ns_pos_keyboard_note',
            'value' => ns()->option->get( 'ns_pos_keyboard_note', [] ),
            'label' => __( 'Open Note' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to open the notes.' ),
        ], [
            'name' => 'ns_pos_keyboard_order_type',
            'value' => ns()->option->get( 'ns_pos_keyboard_order_type', [] ),
            'label' => __( 'Order Type Selector' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to open the order type selector.' ),
        ], [
            'name' => 'ns_pos_keyboard_fullscreen',
            'value' => ns()->option->get( 'ns_pos_keyboard_fullscreen', [] ),
            'label' => __( 'Toggle Fullscreen' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut to toggle fullscreen.' ),
        ], [
            'name' => 'ns_pos_keyboard_quick_search',
            'value' => ns()->option->get( 'ns_pos_keyboard_quick_search', [] ),
            'label' => __( 'Quick Search' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Keyboard shortcut open the quick search popup.' ),
        ], [
            'name' => 'ns_pos_keyboard_toggle_merge',
            'value' => ns()->option->get( 'ns_pos_keyboard_toggle_merge', [] ),
            'label' => __( 'Toggle Product Merge' ),
            'type' => 'inline-multiselect',
            'options' => $shortcuts,
            'description' => __( 'Will enable or disable the product merging.' ),
        ], [
            'name' => 'ns_pos_amount_shortcut',
            'value' => ns()->option->get( 'ns_pos_amount_shortcut' ),
            'label' => __( 'Amount Shortcuts' ),
            'type' => 'text',
            'description' => __( 'The amount numbers shortcuts separated with a "|".' ),
        ],
    ],
];
