#
# Copyright (c) 2021 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

mainmenu "Matter Lock sample application"

config CHIP_SUNION_SERVICE_MAX_COMMANDS
       	int "Maximum number of commands for sunion service"
	default 2

config CHIP_SUNION_SERVICE_MAX_COMMAND_LEN
       	int "Maximum number of single command for sunion service."
	default 10

config LOCK_NUM_USERS
	int "Maximum number of users supported by lock"
	default 10

config LOCK_NUM_CREDENTIALS
	int "Maximum number of credentials supported by lock"
	default 20

config LOCK_NUM_CREDENTIALS_PER_USER
	int "Maximum number of credentials per user supported by lock"
	default 3

config STATE_LEDS
	bool "Use LEDs to indicate the device state"
	default y
	help
	  Use LEDs to render the current state of the device such as the progress of commissioning of
	  the device into a network or the factory reset initiation. Note that setting this option to
	  'n' does not disable the LED indicating the state of the simulated bolt.

config THREAD_WIFI_SWITCHING
	bool "Switching between Thread and Wi-Fi network support"
	depends on SOC_SERIES_NRF53X
	depends on NET_L2_OPENTHREAD || CHIP_WIFI
	depends on CHIP_OTA_REQUESTOR
	select EXPERIMENTAL
	help
	  Enable the functionality that allows a user to switch between Matter over Thread and Matter
	  over Wi-Fi variants of the application, stored in the respective partitions in the external
	  flash memory.

if THREAD_WIFI_SWITCHING

config APPLICATION_IDX
	int
	default 1 if NET_L2_OPENTHREAD
	default 2 if CHIP_WIFI

config APPLICATION_OTHER_IDX
	int
	default 2 if NET_L2_OPENTHREAD
	default 1 if CHIP_WIFI

config APPLICATION_LABEL
	string
	default "Thread" if NET_L2_OPENTHREAD
	default "Wi-Fi" if CHIP_WIFI

config APPLICATION_OTHER_LABEL
	string
	default "Wi-Fi" if NET_L2_OPENTHREAD
	default "Thread" if CHIP_WIFI

config THREAD_WIFI_SWITCHING_CLI_SUPPORT
	bool "Add CLI command for triggering of the switch between Thread and Wi-Fi"
	default n
	select CHIP_LIB_SHELL

# We need more heap size for image swap buffers
config CHIP_MALLOC_SYS_HEAP_SIZE
	default 30720 if CHIP_WIFI
	default 10240 if NET_L2_OPENTHREAD

endif

# Sample configuration used for Thread networking
if NET_L2_OPENTHREAD

choice OPENTHREAD_NORDIC_LIBRARY_CONFIGURATION
	default OPENTHREAD_NORDIC_LIBRARY_MTD
endchoice

choice OPENTHREAD_DEVICE_TYPE
	default OPENTHREAD_MTD
endchoice

config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
	default y

# Reduce Thread TX output power to 0 dBm for SED device
config OPENTHREAD_DEFAULT_TX_POWER
	int
	default 0

endif # NET_L2_OPENTHREAD

if CHIP_WIFI

config NRF_WIFI_LOW_POWER
	default y

endif # CHIP_WIFI

config CHIP_ICD_SUBSCRIPTION_HANDLING
	default y

source "${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.features"
source "${ZEPHYR_CONNECTEDHOMEIP_MODULE_DIR}/config/nrfconnect/chip-module/Kconfig.defaults"
source "Kconfig.zephyr"
