"use client"; // AI danışman sohbeti — sayfa altında yüzen buton + intercom tarzı popup. // Motion dili: panel tetikleyicisinden doğar (transform-origin sağ-alt), // spring ile açılır; çıkış girişten hızlı. Reduced motion'da cross-fade. import { useEffect, useState } from "react"; import { MessageCircleMore, X } from "lucide-react"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { SohbetClient } from "@/app/listem/sohbet-client"; import { ViewportPortal } from "@/components/viewport-portal"; export function SohbetPopup({ kredi }: { kredi: number }) { const [acik, setAcik] = useState(false); const azMotion = useReducedMotion(); useEffect(() => { if (!acik) return; const dinle = (e: KeyboardEvent) => { if (e.key === "Escape") setAcik(false); }; window.addEventListener("keydown", dinle); return () => window.removeEventListener("keydown", dinle); }, [acik]); return ( {acik ? ( ) : null} {/* Yüzen tetikleyici — basışta anında küçülür (pointer-down feedback) */} ); }