# qv. https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/AppManifests.md

App(
    appid="seader",
    name="Seader",
    apptype=FlipperAppType.EXTERNAL,
    entry_point="seader_app",
    cdefines=["APP_SEADER"],
    requires=[
        "gui",
        "storage",
        "nfc",
    ],
    stack_size=5 * 1024,
    order=20,
    sources=[
        "*.c",
        "aeabi_uldivmod.sx",
        "!plugin/*.c",
    ],
    fap_icon="icons/logo.png",
    fap_category="NFC",
    fap_version="2.8",
    fap_author="bettse",
    #    fap_extbuild=(
    #        ExtFile(
    #            path="${FAP_SRC_DIR}/lib/asn1/asn_system.h",
    #            command="asn1c -D ${FAP_SRC_DIR}/lib/asn1 -no-gen-example -pdu=all ${FAP_SRC_DIR}/seader.asn1"
    #        ),
    #    ),
    fap_libs=["mbedtls"],
    fap_private_libs=[
        Lib(
            name="asn1",
            cflags=["-Wno-error"],
        ),
        Lib(
            name="loclass",
            cflags=["-O3"],
        ),
    ],
    fap_weburl="https://seader.ericbetts.dev",
    fap_icon_assets="icons",
)

App(
    appid="seader_plugin_wiegand",
    apptype=FlipperAppType.PLUGIN,
    entry_point="plugin_wiegand_ep",
    requires=["seader"],
    sources=["plugin/wiegand.c"],
    fal_embedded=True,
)
