/**
 * Firebase Shared Configuration
 *
 * Utilidades genéricas para configuración de Firebase.
 * Las constantes específicas del proyecto (APP_IDS, FIREBASE_PROJECTS, EMULATOR_CONFIG)
 * deben definirse en cada app consumidora.
 */
import { AppId, EmulatorConfig, FirebaseConfig, ValtechFirebaseConfig } from './types';
import type { AnalyticsConfig } from './analytics-types';
export type { AppId } from './types';
/**
 * Genera paths de Storage alineados con storage.rules.
 *
 * Convenciones (ver frontend/firebase/storage.rules):
 * - Avatar global del user (cross-app): /users/{uid}/avatar.jpg
 * - Files privados del user (cross-app): /users/{uid}/files/{path}
 * - Avatar per-app del user: /apps/{appId}/users/{uid}/avatar.jpg
 * - Files per-app del user: /apps/{appId}/users/{uid}/files/{path}
 * - Public per-app: /apps/{appId}/public/{path}
 * - Shared per-app (auth-only): /apps/{appId}/shared/{path}
 * - Public global: /public/{path}
 *
 * @example
 * storagePaths.forApp('showcase', 'public', 'banner.jpg')
 * // => 'apps/showcase/public/banner.jpg'
 *
 * storagePaths.userAvatar('user123')
 * // => 'users/user123/avatar.jpg'
 *
 * storagePaths.appUserFile('showcase', 'user123', 'doc.pdf')
 * // => 'apps/showcase/users/user123/files/doc.pdf'
 */
export declare const storagePaths: {
    /** Path per-app: apps/{appId}/{...paths} */
    forApp: (appId: AppId, ...paths: string[]) => string;
    /** Avatar global del user (cross-app) */
    userAvatar: (userId: string) => string;
    /** Thumbnail global del user (cross-app) */
    userThumb: (userId: string) => string;
    /** File privado global del user (cross-app) */
    userFile: (userId: string, ...paths: string[]) => string;
    /** Avatar per-app del user */
    appUserAvatar: (appId: AppId, userId: string) => string;
    /** File per-app del user */
    appUserFile: (appId: AppId, userId: string, ...paths: string[]) => string;
    /** Public global (acceso sin auth, write admin-only) */
    public: (...paths: string[]) => string;
};
/**
 * Genera paths de colecciones alineados con firestore.rules.
 *
 * Convenciones (ver frontend/firebase/firestore.rules):
 * - Cross-app shared:
 *   /users/{uid} (privado), /profiles/{uid} (público global),
 *   /users/{uid}/notifications (INBOX GLOBAL cross-app cross-org)
 * - Per-app:
 *   /apps/{appId}/{collection}, /apps/{appId}/profiles/{uid}
 * - Per-app per-user (notifications NO viven aquí):
 *   /apps/{appId}/users/{uid}/{collection}
 * - Per-app per-org:
 *   /apps/{appId}/orgs/{orgId}/{collection}
 *
 * @example
 * collections.forApp('showcase', 'items')
 * // => 'apps/showcase/items'
 *
 * collections.appUser('showcase', 'user123', 'drafts')
 * // => 'apps/showcase/users/user123/drafts'
 *
 * collections.appOrg('showcase', 'org_abc', 'posts')
 * // => 'apps/showcase/orgs/org_abc/posts'
 *
 * collections.userNotifications('user123')
 * // => 'users/user123/notifications'
 */
export declare const collections: {
    /** Per-app cross-user: apps/{appId}/{collection} */
    forApp: (appId: AppId, collectionName: string) => string;
    /** Per-app per-user: apps/{appId}/users/{uid}/{collection} */
    appUser: (appId: AppId, userId: string, collectionName: string) => string;
    /** Per-app per-org: apps/{appId}/orgs/{orgId}/{collection} */
    appOrg: (appId: AppId, orgId: string, collectionName: string) => string;
    /** Per-app perfil público del user: apps/{appId}/profiles/{uid} */
    appProfile: (appId: AppId, userId: string) => string;
    /** Inbox global del user (cross-app cross-org) */
    userNotifications: (userId: string) => string;
    /** Cross-app shared (sin namespace, nivel raíz) */
    shared: {
        /** Doc privado del user — /users/{uid} */
        users: string;
        /** Perfiles públicos globales — /profiles/{uid} */
        profiles: string;
    };
};
/**
 * Opciones para crear la configuración de Firebase
 */
export interface CreateFirebaseConfigOptions {
    /**
     * Configuración de emuladores (para desarrollo local).
     * Pasa tu propia configuración con hosts y puertos.
     */
    emulator?: EmulatorConfig;
    /** Habilitar persistencia offline de Firestore */
    persistence?: boolean;
    /**
     * ID de la aplicación para namespacing automático.
     * Cuando se configura, FirestoreService y StorageService prefijan automáticamente los paths.
     */
    appId?: string;
    /**
     * Habilitar Firebase Analytics / GA4.
     * Requiere measurementId en firebase config.
     */
    enableAnalytics?: boolean;
    /**
     * Configuración detallada de Analytics.
     * Solo aplica si enableAnalytics es true.
     */
    analyticsConfig?: AnalyticsConfig;
}
/**
 * Crea la configuración completa de Firebase desde variables de entorno.
 * Usa esto en el environment.ts de cada app.
 *
 * @example
 * // environment.ts
 * import { createFirebaseConfig } from 'valtech-components';
 * import { APP_IDS, EMULATOR_CONFIG, USE_EMULATORS } from '../config/app-config';
 * import firebaseConfig from '../config/firebase.config.json';
 *
 * export const environment = {
 *   valtechFirebase: createFirebaseConfig(
 *     {
 *       ...firebaseConfig,
 *       enableMessaging: true,
 *       messagingVapidKey: 'BHLx...',
 *     },
 *     {
 *       emulator: USE_EMULATORS ? EMULATOR_CONFIG : undefined,
 *       persistence: true,
 *       appId: APP_IDS.MY_APP,
 *     }
 *   ),
 * };
 */
export declare function createFirebaseConfig(config: FirebaseConfig, options?: CreateFirebaseConfigOptions): ValtechFirebaseConfig;
/**
 * Verifica si la configuración tiene emuladores habilitados
 */
export declare function isEmulatorMode(config: ValtechFirebaseConfig): boolean;
