import { Location } from '@angular/common'; import { Router } from '@angular/router'; import { InAppBrowserService } from '../in-app-browser.service'; import { HeaderConfig, HomeHeaderConfig, CustomHeaderConfig } from './types'; import * as i0 from "@angular/core"; /** * NavigationService * * Servicio centralizado para navegacion y configuracion de headers. * Permite a las paginas declarar su tipo de header de forma simple. * * @example * // En una pagina con header de tipo "back" * export class ProfilePage { * private nav = inject(NavigationService); * * constructor() { * this.nav.setBackHeader('pageTitle', 'Settings.Profile'); * } * } * * @example * // En el layout principal (tabs.page.ts) * export class TabsPage { * private nav = inject(NavigationService); * * headerConfig = this.nav.headerConfig; * headerTitle = this.nav.headerTitle; * } */ export declare class NavigationService { router: Router; location: Location; inAppBrowser: InAppBrowserService; private i18n; private readonly _headerConfig; /** * Configuracion actual del header (readonly signal) */ readonly headerConfig: import("@angular/core").Signal; /** * Titulo del header traducido y reactivo al cambio de idioma. * Solo aplica para headers tipo 'back' o 'custom' con titleKey. */ readonly headerTitle: import("@angular/core").Signal; /** * Indica si el header actual tiene boton volver */ readonly hasBackButton: import("@angular/core").Signal; /** * Arbitrary data to be transferred during navigation. * @deprecated Use navigateWithData instead */ data: any; constructor(router: Router, location: Location, inAppBrowser: InAppBrowserService); /** * Configura un header tipo "back" con titulo traducido. * * @param key Clave i18n (ej: 'pageTitle') * @param namespace Namespace i18n (ej: 'Settings.Profile') * @param options Opciones adicionales (backText, withMenu) * * @example * // Sin menu * this.nav.setBackHeader('pageTitle', 'Settings.Profile'); * * @example * // Con menu hamburguesa * this.nav.setBackHeader('pageTitle', 'Settings.Profile', { withMenu: true }); */ setBackHeader(key: string, namespace: string, options?: { backText?: string; withMenu?: boolean; }): void; /** * Configura un header tipo "home" con logo y acciones. * * @param options Opciones del header home * * @example * this.nav.setHomeHeader({ * withMenu: true, * actions: [ * { type: 'ICON', token: 'notifications', position: 'right', description: 'notifications-outline' } * ] * }); */ setHomeHeader(options?: Partial>): void; /** * Configura un header personalizado. * * @param options Opciones del header */ setCustomHeader(options: Omit): void; /** * Oculta el header completamente. */ hideHeader(): void; /** * Resetea el header al estado por defecto (home). */ resetHeader(): void; /** * Opens a URL using the in-app browser service. * @param url The URL to open */ navigateInApp(url: string): void; /** * Navigates to a route and transfers data using Angular Router state. * @param route The route to navigate to * @param dataTransfer The data to transfer */ navigateWithData(route: string, dataTransfer: any): void; /** * Navigates to a URL using Angular Router. * @param url The URL to navigate to */ navigateByUrl(url: string): void; /** * Opens a URL in a new browser tab. * @param url The URL to open */ openInNewTab(url: string): void; /** * Navigates back to the previous page in the browser history. */ back(): void; /** * Traduce una clave i18n en formato 'namespace.key' */ private translateKey; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }