import { AfterViewInit, ChangeDetectorRef, DestroyRef, OnInit } from "@angular/core"; import { MatDialog } from "@angular/material/dialog"; import { FormBuilder, FormGroup } from "@angular/forms"; import { CoreI18nService, CoreService, SidenavService } from "../../../services"; import { ToastrService } from "ngx-toastr"; import * as i0 from "@angular/core"; export declare class PreviousRequestsComponent implements OnInit, AfterViewInit { dialog: MatDialog; private readonly sidenavService; coreService: CoreService; private readonly toasterService; i18n: CoreI18nService; private readonly fb; private cd; previousRequests: any[]; destroyRef: DestroyRef; loading: boolean; filterFormGroup: FormGroup; errorMessage: string; isOpen: boolean; monthsOptions: { key: string; value: string; }[]; yearsOptions: { key: number; value: number; }[]; statuses: any[]; searchData: { year: any; month: any; }; constructor(dialog: MatDialog, sidenavService: SidenavService, coreService: CoreService, toasterService: ToastrService, i18n: CoreI18nService, fb: FormBuilder, cd: ChangeDetectorRef); /** * Initializes the component on initialization. * It creates a form and sets the available statuses based on the current language. * * @return {void} */ ngOnInit(): void; private readonly ngUnsubscribe; /** * Generates form controls for the current month and year. * * @return {object} An object containing form controls for the current month and year. * - month: FormControl for the current month with Validators required * - year: FormControl for the current year with Validators required */ private currentDateControl; /** * Initializes a form group for filtering data. * It creates form controls for the current date and status. * Also sets up a subscription to listen for changes in the status control. * * @return {void} */ createForm(): void; /** * Perform initialization after Angular has fully initialized a component's view. * * @return {void} */ ngAfterViewInit(): void; /** * Clear all filters and reset the form group to its initial state. * Sets the month and year filters to the current date's month and year respectively. * Sets the status filter to an empty string. * Toggles the isOpen property and triggers the filterStatus method. * * @return {void} */ clearFilters(): void; /** * Toggles the isOpen property and triggers the getRequests() method. * * @return {void} */ applyFilters(): void; /** * Retrieves request data based on form values. * * @return {void} */ getRequests(): void; /** * Retrieves the form values including the year and month. * * @return {Object} Returns an object containing the year and month values. */ getFormValues(): { year: number; month: number; }; /** * Retrieves the selected year value from the filter form group. * * @return The selected year value as a number. */ private getYearValue; /** * Retrieves the month value from the filter form group. * * @return {number} The month value retrieved from the form group. */ private getMonthValue; /** * Checks if the year and month values of two form objects are equal. * * @param {Object} first - The first form object to compare. * @param {Object} second - The second form object to compare. * @returns {boolean} - true if the year and month values are equal, otherwise false. */ areFormValuesEqual(first: any, second: any): boolean; /** * Update the search data with the provided data. * * @param {Object} data - The new search data to update. * * @return {void} */ updateSearchData(data: any): void; /** * Sends a request to retrieve core data using the Core Service API. * Initializes loading and requests before making the call. * * @return {void} */ requestCoreData(): void; /** * Initializes loading and requests. * * @return {void} */ initializeLoadingAndRequests(): void; /** * Handles successful response from a request. * * @param {Object} response - The response object containing history data. * @return {void} */ handleRequestSuccess(response: any): void; /** * Handles the error received from a request * * @param {Object} err - The error object containing information about the error * @return {void} */ handleRequestError(err: any): void; /** * Filters the previous requests based on the status selected in the filter form. * * @return {void} */ filterStatus(): void; /** * Opens a form in a new window based on the provided form ID. * * @param {string} formId - The ID of the form to be opened. * @return {void} */ viewForm(formId: string): void; /** * Closes the side navigation panel. * * @return {void} */ closeSidenav(): void; /** * Emit the value to complete all active subscriptions * * @return {void} */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }