idf_component_register(
    SRCS "../../../main/radio.c"
    INCLUDE_DIRS "include"
    PRIV_REQUIRES bt esp_driver_gpio esp_hw_support esp_timer freertos nvs_flash)

if(NOT CMAKE_BUILD_EARLY_EXPANSION)
    target_compile_definitions(${COMPONENT_LIB} PRIVATE TRANSPONDER_ESP32S3=1)
    if(NOT IDF_TARGET STREQUAL "esp32s3")
        message(FATAL_ERROR "The Xtensa indicator profile requires ESP32-S3")
    endif()
    if(NOT CONFIG_BT_NIMBLE_NVS_PERSIST OR NOT CONFIG_BT_NIMBLE_SM_SC
            OR CONFIG_BT_NIMBLE_SM_LEGACY OR CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS
            OR NOT CONFIG_BT_NIMBLE_SM_SC_ONLY EQUAL 1 OR NOT CONFIG_BT_NIMBLE_SM_LVL EQUAL 4)
        message(FATAL_ERROR "The indicator requires authenticated, bonded LE Secure Connections")
    endif()
endif()
