#include <bootutil/boot_hooks.h>
#include <bootutil/image.h>
#include <flash_map/flash_map.h>
#include <zephyr/logging/log.h>

LOG_MODULE_REGISTER(my_hooks, LOG_LEVEL_INF);

int boot_perform_update_hook(int image_index,
                             const struct image_header *img_head,
                             const struct flash_area *fap_primary,
                             const struct flash_area *fap_secondary)
{
    ARG_UNUSED(img_head);
    ARG_UNUSED(fap_primary);
    ARG_UNUSED(fap_secondary);

    LOG_INF("MCUBoot update hook called for image %d", image_index);

    /* Example: return BOOT_HOOK_REGULAR to continue normal flow */
    return BOOT_HOOK_REGULAR;
}
