import { FirebaseApp } from '@firebase/app'; import { default as React_2 } from 'react'; import { RoutesProps } from 'react-router-dom'; /** * An instance of the Firebase Crashlytics SDK. * * Do not create this instance directly. Instead, use {@link getCrashlytics | getCrashlytics()}. * * @public */ export declare interface Crashlytics { /** * The {@link @firebase/app#FirebaseApp} this {@link Crashlytics} instance is associated with. */ app: FirebaseApp; } /** * Options for initializing the Crashlytics service using {@link getCrashlytics | getCrashlytics()}. * * @public */ export declare interface CrashlyticsOptions { /** * The URL for the endpoint to which Crashlytics data should be sent, in the OpenTelemetry format. * By default, data will be sent to Firebase. */ endpointUrl?: string; /** * The Google Cloud region where the Crashlytics data should be sent. * * By default, data will be sent to the "global" region. * * Refer to https://cloud.google.com/logging/docs/regions for the list of available regions. */ region?: string; /** * The version of the application. This should be a unique string that identifies the snapshot of * code to be deployed, such as "1.0.2". If not specified, other default locations will be checked * for an identifier. Setting a value here takes precedence over any other values. */ appVersion?: string; } /** * A wrapper around {@link react-router-dom#Routes} that automatically captures errors in route components. * * This component acts as a replacement for `Routes` from `react-router-dom`. It wraps the routes * in an error boundary that captures errors thrown during rendering and reports them to Crashlytics. * The error boundary is reset on navigation (path changes). * * @example * ```tsx * import { useEffect, useState } from "react"; * import { CrashlyticsRoutes } from "@firebase/crashlytics/react-router"; * import { FirebaseApp, initializeApp } from "@firebase/app"; * * export default function MyApp() { * const [app, setApp] = useState(null); * * useEffect(() => { * if (getApps().length === 0) { * const newApp = initializeApp({...}); * setApp(newApp); * } else { * setApp(getApp()); * } * }, []); * * return ( * <> * {app && ( * * } /> * } /> * * )} * ... * * ); * } * ``` * * @param firebaseApp - The {@link @firebase/app#FirebaseApp} instance to use. * @param crashlyticsOptions - {@link CrashlyticsOptions} that configure the Crashlytics instance. * @returns The rendered routes wrapped in an error boundary. * * @public */ export declare function CrashlyticsRoutes({ firebaseApp, crashlyticsOptions, children, ...props }: RoutesProps & { firebaseApp: FirebaseApp; crashlyticsOptions?: CrashlyticsOptions; }): React_2.ReactElement | null; export { }