// plip_ui — on-screen telephone for the phone-less PLIP annex (BOX-3 LCD).
//
// Two views on the 320x240 display, switched by the hook state of
// plip_virtual:
//   - idle / ringing : a telephone illustration + status line; during a ring
//     the screen shows "Appel entrant…".
//   - off-hook       : a 3x4 dial keypad (1-9, *, 0, #) with a number field.
//
// A fixed bottom button toggles the hook: "Décrocher" (green) while ringing,
// "Raccrocher" (red) while off-hook. It is disabled when idle.
//
// All LVGL access is guarded with bsp_display_lock/unlock. The widget tree is
// built once; hook-state changes only flip visibility + the bottom button,
// driven by the plip_virtual state callback.

#pragma once

#include "esp_err.h"

#ifdef __cplusplus
extern "C" {
#endif

// Build the phone UI on the active LVGL display and subscribe to
// plip_virtual hook transitions. Call after bsp_display_start() and
// plip_virtual_init(). Idempotent.
esp_err_t plip_ui_init(void);

#ifdef __cplusplus
}
#endif
