App(
    appid="js_app",
    name="JS Runner",
    apptype=FlipperAppType.SYSTEM,
    entry_point="js_app",
    stack_size=2 * 1024,
    resources="examples",
    order=10,
    provides=["js_app_start"],
    sources=[
        "js_app.c",
        "js_modules.c",
        "js_thread.c",
        "js_value.c",
        "plugin_api/app_api_table.cpp",
        "views/console_view.c",
        "modules/js_flipper.c",
        "modules/js_tests.c",
    ],
)

App(
    appid="js_app_start",
    apptype=FlipperAppType.STARTUP,
    entry_point="js_app_on_system_start",
    order=110,
    sources=["js_app.c"],
)

App(
    appid="js_event_loop",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_event_loop_ep",
    requires=["js_app"],
    sources=[
        "modules/js_event_loop/js_event_loop.c",
        "modules/js_event_loop/js_event_loop_api_table.cpp",
    ],
)

App(
    appid="js_gui",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_gui_ep",
    requires=["js_app"],
    sources=["modules/js_gui/js_gui.c", "modules/js_gui/js_gui_api_table.cpp"],
)

App(
    appid="js_gui__loading",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_loading_ep",
    requires=["js_app"],
    sources=["modules/js_gui/loading.c"],
)

App(
    appid="js_gui__empty_screen",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_empty_screen_ep",
    requires=["js_app"],
    sources=["modules/js_gui/empty_screen.c"],
)

App(
    appid="js_gui__submenu",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_submenu_ep",
    requires=["js_app"],
    sources=["modules/js_gui/submenu.c"],
)

App(
    appid="js_gui__text_input",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_text_input_ep",
    requires=["js_app"],
    sources=["modules/js_gui/text_input.c"],
)

App(
    appid="js_gui__byte_input",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_byte_input_ep",
    requires=["js_app"],
    sources=["modules/js_gui/byte_input.c"],
)

App(
    appid="js_gui__text_box",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_text_box_ep",
    requires=["js_app"],
    sources=["modules/js_gui/text_box.c"],
)

App(
    appid="js_gui__dialog",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_dialog_ep",
    requires=["js_app"],
    sources=["modules/js_gui/dialog.c"],
)

App(
    appid="js_gui__file_picker",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_gui_file_picker_ep",
    requires=["js_app"],
    sources=["modules/js_gui/file_picker.c"],
    fap_libs=["assets"],
)

App(
    appid="js_gui__widget",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_view_widget_ep",
    requires=["js_app"],
    sources=["modules/js_gui/widget.c"],
)

App(
    appid="js_gui__icon",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_gui_icon_ep",
    requires=["js_app"],
    sources=["modules/js_gui/icon.c"],
    fap_libs=["assets"],
)

App(
    appid="js_notification",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_notification_ep",
    requires=["js_app"],
    sources=["modules/js_notification.c"],
)

App(
    appid="js_badusb",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_badusb_ep",
    requires=["js_app"],
    sources=["modules/js_badusb.c"],
)

App(
    appid="js_serial",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_serial_ep",
    requires=["js_app"],
    sources=["modules/js_serial.c"],
)

App(
    appid="js_gpio",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_gpio_ep",
    requires=["js_app"],
    sources=["modules/js_gpio.c"],
)

App(
    appid="js_math",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_math_ep",
    requires=["js_app"],
    sources=["modules/js_math.c"],
)

App(
    appid="js_storage",
    apptype=FlipperAppType.PLUGIN,
    entry_point="js_storage_ep",
    requires=["js_app"],
    sources=["modules/js_storage.c"],
)
