// src/hooks/useLogOnce.ts
import { useEffect, useState } from "react";
var defaultOptions = {
  type: "warning"
};
var useLogOnce = (message, condition, options) => {
  const [hasLogged, setHasLogged] = useState(false);
  const { type } = { ...defaultOptions, ...options };
  useEffect(() => {
    if (!hasLogged && condition) {
      switch (type) {
        case "info":
          console.info(message);
          break;
        case "error":
          console.error(message);
          break;
        case "warning":
          console.warn(message);
          break;
      }
      setHasLogged(true);
    }
  }, [condition]);
};
export {
  useLogOnce
};
//# sourceMappingURL=useLogOnce.js.map