import {
  useIsomorphicLayoutEffect
} from "./chunk-ABSTTY5Q.js";

// src/hooks/useDocumentTitle.tsx
import { useEffect } from "react";
var useDocumentTitle = (defaultPrefix, title) => {
  useIsomorphicLayoutEffect(() => {
    window.document.title = `${defaultPrefix} - ${title}`;
  }, [title, defaultPrefix]);
  useEffect(() => {
    return () => {
      window.document.title = defaultPrefix;
    };
  }, [defaultPrefix]);
};

export {
  useDocumentTitle
};
