//! Bluetooth skills registration

use crate::{SkillCategory, SkillRegistryMap};
use std::collections::HashMap;
use std::sync::Arc;

pub fn register(registry: &mut SkillRegistryMap) {
    let category = SkillCategory::Bluetooth;
    let map = registry.entry(category).or_insert_with(HashMap::new);

    #[cfg(any(feature = "bluetooth", feature = "all"))]
    {
        use crate::skills::*;

        map.insert(
            "bluetooth_turn_on".to_string(),
            Arc::new(BluetoothTurnOnSkill),
        );
        map.insert(
            "bluetooth_turn_off".to_string(),
            Arc::new(BluetoothTurnOffSkill),
        );
        map.insert("bluetooth_scan".to_string(), Arc::new(BluetoothScanSkill));
        map.insert(
            "bluetooth_pairable".to_string(),
            Arc::new(BluetoothPairableSkill),
        );
        map.insert("bluetooth_pair".to_string(), Arc::new(BluetoothPairSkill));
        map.insert(
            "bluetooth_unpair".to_string(),
            Arc::new(BluetoothUnpairSkill),
        );
        map.insert(
            "bluetooth_list_paired".to_string(),
            Arc::new(BluetoothListPairedSkill),
        );
        map.insert(
            "bluetooth_connect".to_string(),
            Arc::new(BluetoothConnectSkill),
        );
        map.insert(
            "bluetooth_disconnect".to_string(),
            Arc::new(BluetoothDisconnectSkill),
        );
        map.insert(
            "bluetooth_send_file".to_string(),
            Arc::new(BluetoothSendFileSkill),
        );
        map.insert(
            "bluetooth_receive_file".to_string(),
            Arc::new(BluetoothReceiveFileSkill),
        );
        map.insert(
            "bluetooth_serial".to_string(),
            Arc::new(BluetoothSerialSkill),
        );
        map.insert(
            "bluetooth_scan_services".to_string(),
            Arc::new(BluetoothScanServicesSkill),
        );
        map.insert(
            "bluetooth_ble_read".to_string(),
            Arc::new(BluetoothBleReadSkill),
        );
        map.insert(
            "bluetooth_ble_write".to_string(),
            Arc::new(BluetoothBleWriteSkill),
        );
        map.insert(
            "bluetooth_ble_notify".to_string(),
            Arc::new(BluetoothBleNotifySkill),
        );
        map.insert(
            "bluetooth_adapter_status".to_string(),
            Arc::new(BluetoothAdapterStatusSkill),
        );
        map.insert(
            "bluetooth_set_device_name".to_string(),
            Arc::new(BluetoothSetDeviceNameSkill),
        );
        map.insert(
            "bluetooth_get_mac_address".to_string(),
            Arc::new(BluetoothGetMacAddressSkill),
        );
        map.insert(
            "bluetooth_reject_pairing".to_string(),
            Arc::new(BluetoothRejectPairingSkill),
        );
        map.insert(
            "bluetooth_confirm_pin".to_string(),
            Arc::new(BluetoothConfirmPinSkill),
        );
        map.insert(
            "bluetooth_set_discoverable_timeout".to_string(),
            Arc::new(BluetoothSetDiscoverableTimeoutSkill),
        );
        map.insert(
            "bluetooth_get_connected_devices".to_string(),
            Arc::new(BluetoothGetConnectedDevicesSkill),
        );
        map.insert(
            "bluetooth_device_info".to_string(),
            Arc::new(BluetoothDeviceInfoSkill),
        );
        map.insert(
            "bluetooth_audio_connect".to_string(),
            Arc::new(BluetoothAudioConnectSkill),
        );
        map.insert(
            "bluetooth_audio_disconnect".to_string(),
            Arc::new(BluetoothAudioDisconnectSkill),
        );
        map.insert(
            "bluetooth_hid_connect".to_string(),
            Arc::new(BluetoothHidConnectSkill),
        );
        map.insert(
            "bluetooth_trust_device".to_string(),
            Arc::new(BluetoothTrustDeviceSkill),
        );
        map.insert(
            "bluetooth_delete_device".to_string(),
            Arc::new(BluetoothDeleteDeviceSkill),
        );
        map.insert(
            "bluetooth_le_advertise_start".to_string(),
            Arc::new(BluetoothLeAdvertiseStartSkill),
        );
        map.insert(
            "bluetooth_le_advertise_stop".to_string(),
            Arc::new(BluetoothLeAdvertiseStopSkill),
        );
        map.insert(
            "bluetooth_le_scan_filter".to_string(),
            Arc::new(BluetoothLeScanFilterSkill),
        );
        map.insert(
            "bluetooth_battery_get".to_string(),
            Arc::new(BluetoothBatteryGetSkill),
        );
        map.insert(
            "bluetooth_rssi_get".to_string(),
            Arc::new(BluetoothRssiGetSkill),
        );
        map.insert(
            "bluetooth_firmware_version".to_string(),
            Arc::new(BluetoothFirmwareVersionSkill),
        );
        map.insert(
            "bluetooth_rename_device".to_string(),
            Arc::new(BluetoothRenameDeviceSkill),
        );
        map.insert(
            "bluetooth_profile_list".to_string(),
            Arc::new(BluetoothProfileListSkill),
        );
        map.insert(
            "bluetooth_priority_set".to_string(),
            Arc::new(BluetoothPrioritySetSkill),
        );
        map.insert(
            "bluetooth_auto_connect_toggle".to_string(),
            Arc::new(BluetoothAutoConnectToggleSkill),
        );
        map.insert(
            "bluetooth_set_receive_directory".to_string(),
            Arc::new(BluetoothSetReceiveDirectorySkill),
        );
    }
}
