/**
 * Screens where the floating launcher must not render at all, keyed by Inertia
 * component name (`usePage().component`) rather than by URL: each of these
 * pages has exactly one `Inertia::render` call site, so the name holds across
 * query strings and sub-routes (`/guest-communication/discussions/{id}` renders
 * `messagerie/index` too, where a `startsWith` on the path would not).
 *
 * Why each one is listed:
 * - `chatbot/index`     the page IS the assistant. The launcher would mount a
 *                       second `useChatbot()` instance persisting to the same
 *                       localStorage key — the two conversations diverge.
 * - `chat/index`        bottom-anchored composer: the 56px launcher lands on
 *                       the « Envoyer » button and swallows the click.
 * - `messagerie/index`  same geometry, for `/guest-communication`.
 * - `companyInfo/index` `sticky bottom-0` save bar (z-10, under the launcher's
 *                       z-60): « Enregistrer » is covered at every scroll
 *                       position, not just at the bottom of the page.
 * - `whiteLabel/index`  full-frame Rentals United iframe — we do not control
 *                       what sits in its bottom-right corner.
 */
export const LAUNCHER_HIDDEN_ON: readonly string[] = [
    'chatbot/index',
    'chat/index',
    'messagerie/index',
    'companyInfo/index',
    'whiteLabel/index',
];

/** Whether the floating launcher may render on the given Inertia page. */
export function shouldRenderLauncher(component: string): boolean {
    return !LAUNCHER_HIDDEN_ON.includes(component);
}
