{"version":3,"file":"use-document-title.cjs","names":[],"sources":["../../src/hooks/use-document-title.ts"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Set `document.title` while the component is mounted, restoring the previous\n * title on unmount. SSR-safe — no-op when `document` is unavailable.\n *\n * @param title - the title to apply.\n */\nexport function useDocumentTitle(title: string): void {\n    useEffect(() => {\n        if (typeof document === \"undefined\") return;\n        const previous = document.title;\n        document.title = title;\n        return () => {\n            document.title = previous;\n        };\n    }, [title]);\n}\n"],"mappings":"uBAQA,SAAgB,EAAiB,EAAqB,EAClD,EAAA,EAAA,UAAA,KAAgB,CACZ,GAAI,OAAO,SAAa,IAAa,OACrC,IAAM,EAAW,SAAS,MAE1B,MADA,UAAS,MAAQ,MACJ,CACT,SAAS,MAAQ,CACrB,CACJ,EAAG,CAAC,CAAK,CAAC,CACd"}