import { ActivatedRoute } from '@angular/router';
import { getSafeRedirectUrl } from '../utils/safe-redirect';

export { }

declare global {
	interface RouterExtensions {
		addDays(days: number): Date;
	}
	}

export class ExActivatedRoute extends ActivatedRoute {

	getCurrentRoute(): string {
		const raw = this.snapshot.queryParams['r'] as string | undefined;
		return getSafeRedirectUrl(raw);
	}
}
