import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime' /** * Redirects the user to General Settings with the AI consent section highlighted. * Call this when an AI feature is blocked because the user has not granted consent. */ export function redirectToAiConsentSettings( router: AppRouterInstance | ReturnType, options?: { replace?: boolean } ) { const url = '/settings/general?highlight=aiConsent' if (options?.replace) { router.replace(url) } else { router.push(url) } } /** * Returns the settings URL that highlights the AI consent section. */ export function getAiConsentSettingsUrl() { return '/settings/general?highlight=aiConsent' }