#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
import { useSaasAppConfig } from "@editor/hooks/useSaasAppConfig";
import { useAppConfig } from "@editor/contexts/AppConfigContext";
import { usePoliciesEnabled } from "@editor/components/policies/usePoliciesEnabled";
import { useSaaSMode } from "@editor/hooks/useSaaSMode";
/** AI availability comes from the connected server's configuration. */
export function useAiEngineEnabled(): boolean {
const cloudConfig = useSaasAppConfig();
const { config } = useAppConfig();
const saas = useSaaSMode();
const enabled = usePoliciesEnabled();
return enabled && Boolean((saas ? cloudConfig : config)?.aiEngineEnabled);
}