//#region src/tui/tui-overlays.ts
/** Focus management for pi-tui overlays (openclaw pattern). */
function createOverlayHandlers(host, fallbackFocus) {
	const openOverlay = (component) => {
		host.showOverlay(component);
	};
	const closeOverlay = () => {
		if (host.hasOverlay()) {
			host.hideOverlay();
			return;
		}
		host.setFocus(fallbackFocus);
	};
	return {
		openOverlay,
		closeOverlay
	};
}
//#endregion
export { createOverlayHandlers };

//# sourceMappingURL=tui-overlays.js.map