import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from "@angular/core";
import { FormBuilder, ValidatorFn } from "@angular/forms";
import { DomSanitizer } from "@angular/platform-browser";
import { ActivatedRoute, Router } from "@angular/router";
import { TranslateService } from "@ngx-translate/core";
import { EmployeeLookupService, StructureFilterService } from "@senior-gestao-pessoas/hcm-entity-lookups";
import { DynamicConfig, FileDto, FormField } from "@seniorsistemas/angular-components";
import { HotkeysService } from "angular2-hotkeys";
import { ConfirmationService, Message, MessageService } from "primeng/api";
import { Observable } from "rxjs";
import { BaseHistoryService } from "../../../../core/entities/base-history/base-history.service";
import { CollectiveHistoryFiltersService } from "../../../../core/entities/collective-history-filters/collective-history-filters.service";
import { DiseaseSubgroupService } from "../../../../core/entities/disease-subgroup/disease-subgroup.service";
import { DiseaseService } from "../../../../core/entities/disease/disease.service";
import { ESocialReasonService } from "../../../../core/entities/e-social-reason/e-social-reason.service";
import { EmployeeService } from "../../../../core/entities/employee/employee.service";
import { LeaveHistoryAttachment } from "../../../../core/entities/leave-history-attachment/leave-history-attachment-dto";
import { LeaveHistoryAttachmentService } from "../../../../core/entities/leave-history-attachment/leave-history-attachment.service";
import { LeaveHistory } from "../../../../core/entities/leave-history/leave-history";
import { LeaveHistoryBFFService } from "../../../../core/entities/leave-history/leave-history-bff.service";
import { LeaveHistoryService } from "../../../../core/entities/leave-history/leave-history.service";
import { SituationService } from "../../../../core/entities/situation/situation.service";
import { CollectiveProcessType } from "../../../../core/enums/collective-process-type";
import { FileValidation } from "../../../../core/enums/file-validation";
import { OnusRemuneration } from "../../../../core/enums/onus-remuneration";
import { ProcessType } from "../../../../core/enums/process-type";
import { SourceReasonChange } from "../../../../core/enums/source-reason-change";
import { WorkAccidentType } from "../../../../core/enums/work-accident-type";
import { FocusService } from "../../../../shared/focus/focus.service";
import { ErrorPageService } from "../../../../shared/services/error-page.service";
import { FieldCustomizationService } from "../../../../shared/services/field-customization.service";
import { MinutesToTimeConversionService } from "../../../../shared/services/minutes-to-time-conversion";
import { PlatformService } from "../../../../shared/services/platform.service";
import { ClockingEventComponent } from "../../../clocking-event-component/clocking-event.component";
export declare class LeaveHistoryFormComponent extends ClockingEventComponent implements OnInit, OnDestroy, AfterViewInit, AfterViewChecked {
    baseHistoryService: BaseHistoryService;
    translate: TranslateService;
    private eSocialReasonService;
    private cdr;
    private readonly minutesToTimeConversionService;
    private leaveHistoryService;
    private leaveHistoryAttachmentService;
    private router;
    private route;
    messageService: MessageService;
    private confirmationService;
    private formBuilder;
    private hotkeysService;
    private fieldCustomization;
    private focusService;
    private diseaseSubgroupService;
    private diseaseService;
    employeeService: EmployeeService;
    private situationService;
    private errorPageService;
    platformService: PlatformService;
    collectiveService: CollectiveHistoryFiltersService;
    private readonly sanitizer;
    private readonly structureService;
    private employeeLookupService;
    private leaveHistoryBFFService;
    localeConfig: any;
    currencyLocaleOptions: any;
    permissions: any;
    allPermissions: any;
    isManager: boolean;
    formFields: FormField[];
    loading: boolean;
    mainPanelCollapsed: boolean;
    isUsingTable: boolean;
    sourceReasonChange: {
        label: string;
        value: SourceReasonChange;
    }[];
    processType: {
        label: string;
        value: ProcessType;
    }[];
    onusRemuneration: {
        label: string;
        value: OnusRemuneration;
    }[];
    workAccidentType: {
        label: string;
        value: WorkAccidentType;
    }[];
    private subgroupCidLookupSuggestionsObservable;
    private subgroupCidLookupSearchObservable;
    private subgroupCidLookupDisplayFields;
    private subgroupCidAdvancedDisplayFields;
    private subgroupCidLookupSeparator;
    private subgroupCidSearchFields;
    private subgroupCidSearchGridFields;
    private diseaseCidLookupSuggestionsObservable;
    private diseaseCidLookupSearchObservable;
    private diseaseCidLookupDisplayFields;
    private diseaseCidAdvancedDisplayFields;
    private diseaseCidLookupSeparator;
    private diseaseCidSearchFields;
    private diseaseCidSearchGridFields;
    private employeeLookupSuggestionsObservable;
    private employeeLookupSearchObservable;
    employeeLookupDisplayFields: string[];
    employeeAdvancedDisplayFields: string[];
    private employeeLookupSeparator;
    private employeeSearchFields;
    private employeeSearchGridFields;
    private currentSituation;
    private situationLookupSuggestionsObservable;
    private situationLookupSearchObservable;
    private situationLabelFields;
    situationAdvancedDisplayFields: string[];
    private situationLookupSeparator;
    private situationSearchFields;
    private situationSearchGridFields;
    private initialValueSituation;
    customizationPermission: {
        visualizar: boolean;
    };
    isReinstatement: boolean;
    customTemplate: TemplateRef<any>;
    customFormFields: TemplateRef<any>;
    collectiveProcessType: CollectiveProcessType;
    files: Blob[];
    onUploadFile: EventEmitter<any>;
    private countBeforeUploadFile;
    private countAfterUploadFile;
    private _warn;
    static HISTORY_NAME: string;
    static SITUATION: string;
    static DOMAIN: string;
    static SERVICE: string;
    errorMessages: {
        required: any;
        min: any;
        max: any;
        minlength: any;
        maxlength: any;
        pattern: any;
        cnpjNotValid: any;
        dateBeforeAdmission: any;
        dateAfterDismissal: any;
        messageProcessNumberRequires17Or21Figures: any;
        messageProcessNumberRequires20Figures: any;
        messageProcessNumberRequires10Figures: any;
        justifiedDaysQuantityMustBeLowerThanEndDate: any;
        timeMustNotBeZero: any;
        estimatedEndDateMustBeGreaterThanOrEqualToStartDate: any;
        endDateMustBeGreaterThanOrEqualToStartDate: any;
    };
    contractTypeOptions: {
        label: string;
        value: string;
    }[];
    situationTypeOptions: {
        label: string;
        value: string;
    }[];
    private originalLeaveHistory;
    private originalESocialReasonType;
    private eSocialReasonType;
    private v1OrV3LeaveWithinSixtyDays;
    protected routeParams: any;
    listFiles: LeaveHistoryAttachment[];
    configs: DynamicConfig[];
    configsFieldSet: DynamicConfig[];
    configObservation: DynamicConfig[];
    configSituation: DynamicConfig[];
    hasAdditionalInformation: boolean;
    private employeeLabel;
    constructor(baseHistoryService: BaseHistoryService, translate: TranslateService, eSocialReasonService: ESocialReasonService, cdr: ChangeDetectorRef, minutesToTimeConversionService: MinutesToTimeConversionService, leaveHistoryService: LeaveHistoryService, leaveHistoryAttachmentService: LeaveHistoryAttachmentService, router: Router, route: ActivatedRoute, messageService: MessageService, confirmationService: ConfirmationService, formBuilder: FormBuilder, hotkeysService: HotkeysService, fieldCustomization: FieldCustomizationService, focusService: FocusService, diseaseSubgroupService: DiseaseSubgroupService, diseaseService: DiseaseService, employeeService: EmployeeService, situationService: SituationService, errorPageService: ErrorPageService, platformService: PlatformService, collectiveService: CollectiveHistoryFiltersService, sanitizer: DomSanitizer, structureService: StructureFilterService, employeeLookupService: EmployeeLookupService, leaveHistoryBFFService: LeaveHistoryBFFService);
    ngOnInit(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    setHotkeys(): void;
    private applyResetFieldWhenIsNew;
    private setGeneralFields;
    private setAdditionalFields;
    private setMaternityLeaveFields;
    private setFieldsV22orV23;
    private setCIDFields;
    private isESocialHasCIDFields;
    private setESocialFields;
    private setV1OrV3Field;
    private setV24Fields;
    isNew(): boolean;
    onRouteParamsChange(params: any): void;
    updateSuggestions(value: any): void;
    private getSuggestionValue;
    onRouteDataChange(data: any): void;
    onCancel(): void;
    onSendFile(filesToDelete: any, filesToCommit: any[]): Observable<{}>;
    onSave(): void;
    onSaveCollective(): void;
    onSaveSingle(): void;
    onDeleteCollective(): void;
    onDelete(): void;
    private doAfterProcessAndResetFormGroup;
    private resetFormGroup;
    onSituationLookupRequest(value: string): void;
    onSituationSearchRequest(event: any): void;
    private checkIfExistsStructureToThrowMessage;
    onSubgroupCidLookupRequest(value: string): void;
    onSubgroupCidSearchRequest(event: any): void;
    onDiseaseCidLookupRequest(value: string): void;
    onDiseaseCidSearchRequest(event: any): void;
    onEmployeeLookupRequest(value: string): void;
    onEmployeeSearchRequest(event: any): void;
    private getFormGroup;
    private setupLookupConfig;
    private getFormFields;
    ngAfterViewChecked(): void;
    private isTimeRequired;
    private isSourceReasonChangeRequired;
    private isProcessTypeRequired;
    private isProcessNumberRequired;
    private isCnpjUnionRequired;
    private isOnusRemunerationRequired;
    private isSameReasonEsocialRequired;
    private isResultedSicknessAssistanceRequired;
    private isObservationRequired;
    private isProcessRequired;
    private isEstimatedJourneyCompletedRequired;
    private isReinstatementInEditMode;
    protected loadDataForTheFirstTime(): void;
    private loadDataBySituation;
    private getESocialReasonTypeObservable;
    private loadDataByStartDate;
    private loadDataByEmployee;
    private getHasV1OrV3LeaveWithinSixtyDaysObservable;
    private getObservable;
    private onESocialReasonTypeChange;
    private onV1OrV3LeaveWithinSixtyDaysChange;
    private isV1ToV3OrV3ToV1;
    private isEditWhithValueInSourceReason;
    private isV24;
    private isV1OrV3;
    private isV21;
    private isV22orV23;
    private getSubgroupCidSearchFields;
    private getSubgroupCidSearchGridFields;
    private getDiseaseCidSearchFields;
    private getDiseaseCidSearchGridFields;
    private getEmployeeSearchFields;
    private getEmployeeSearchGridFields;
    private getSituationSearchFields;
    private getSituationSearchGridFields;
    getProp(obj: any, path: any): any;
    getLabelValue(contents: any[], displayFields: any[]): any[];
    protected goBack(): void;
    private validateAllFormFields;
    private getSaveObservable;
    private createLeaveHistoryObservable;
    private getDeleteObservable;
    private validateVisualization;
    validateAttachmentsVisualization(): boolean;
    private onChangeField;
    protected applyAllFieldBehaviour(): void;
    private applyDisableAllFieldsForEditWhenSituationTypeIsReinstatement;
    /**
     * Este método implementa o padrão Strategy/Template Method para centralizar a lógica de controle
     * de REINSTATEMENT em modo de edição, eliminando repetição de código.
     *
     * @param callback Função que contém a lógica específica a ser executada quando não for REINSTATEMENT em modo de edição.
     */
    private handleReinstatementInEditMode;
    private applyAllFieldBehaviorExceptReinstatement;
    private applyEstimatedJourneyCompletedBehavior;
    private applyEndDateFieldBehaviour;
    private applyStartTimeFieldBehaviour;
    private applySituationFieldBehaviour;
    private applySourceReasonChangeFieldBehaviour;
    private applyProcessTypeFieldBehaviour;
    private applyProcessNumberFieldBehaviour;
    private applyBirthDateFieldBehaviour;
    private applyDiseaseCidFieldBehaviour;
    private applySubgroupCidFieldBehaviour;
    private applyCnpjUnionFieldBehaviour;
    private applyOnusRemunerationFieldBehaviour;
    private applyWorkAccidentTypeFieldBehaviour;
    private applyJustifiedDaysFieldBehaviour;
    private applySameReasonEsocialFieldBehaviour;
    private applyResultedSicknessAssistanceFieldBehaviour;
    private applyObservationFieldBehaviour;
    private applyEstimatedDayEndFieldBehaviour;
    private applyEstimatedEndDateFieldBehaviour;
    private applyEndTimeFieldBehaviour;
    private getEstimatedEndDateIsBeforeOrEqualToStartDateValidator;
    private hasConfigDisablePermission;
    private verifyPermissionEditOnEdit;
    private getEndDateTimeIsBeforeOrEqualToStartDateTimeValidator;
    getProcessNumberValidator(): ValidatorFn;
    private getJustifiedDaysQuantityIsSuperiorToLeaveDaysValidator;
    private getTimeIsNotZeroValidator;
    private formGroupDependent;
    private getFullDateTime;
    handleDateTimeFieldsOnEdit(): void;
    private isHourAndMinuteZero;
    private loadLabelFromEnumOptions;
    /**
     * Adiciona uma condição no JSQL onde não permite que os seguinte tipos de situação:
     * - Trabalhando
     * - Horas Extras
     * - Sobreaviso/Prontidão
     */
    private getFilterByNotAllowedSituationTypes;
    createHistoryDTO(startDate: string, dtoContent: any): LeaveHistory;
    getSaveButtonPermissions(): boolean;
    getDeleteButtonPermissions(): boolean;
    getFormGeneralTitle(): string;
    private getCollectiveFormTitle;
    isUsingTableChange(): boolean;
    onUpload(event: {
        files: LeaveHistoryAttachment[];
    }): void;
    get saveDisable(): boolean;
    get configurationModeAlert(): Message[];
    private doUpload;
    private saveFile;
    onRemoveFile(event: {
        file: FileDto;
    }): void;
    onCancelUpload(event: number): void;
    fieldIsNotNull(field: string): boolean;
    fileValidationErrors(event: FileValidation): void;
    onDownloadFile(event: {
        index: number;
        anchor: ElementRef;
    }): void;
    clockingEventOnSave(): void;
    private setEnabledStatus;
    private setEnabledStatusOnCustomFields;
}
