import { BooleanInput } from '@angular/cdk/coercion'; import * as i0 from '@angular/core'; import { Provider, OnDestroy, EventEmitter, ElementRef, Renderer2, ViewContainerRef } from '@angular/core'; import { ControlValueAccessor, NgControl, FormGroup, FormBuilder, ValidatorFn } from '@angular/forms'; import { MatFormFieldControl } from '@angular/material/form-field'; import { Subject } from 'rxjs'; import { TranslationService, TranslationLabels } from '@moxa/formoxa/mx-shared'; interface MxFileUploaderIntlLabels extends TranslationLabels { browseButtonLabel: string; } declare class MxFileUploaderIntlService extends TranslationService { defaultLabels: MxFileUploaderIntlLabels; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const MX_FILE_UPLOADER_INTL_PROVIDER: Provider; /** @deprecated */ type DeprecatedString = string; declare class MxFileUploaderComponent implements OnDestroy, ControlValueAccessor, MatFormFieldControl { ngControl: NgControl; private fb; private elRef; private renderer; private viewContainerRef; intl: MxFileUploaderIntlService; static nextId: number; value: File | null; form: FormGroup; stateChanges: Subject; focused: boolean; touched: boolean; controlType: string; describedBy: string; shouldLabelFloat: boolean; private onChange; private onTouched; private _cdr; get fileName(): string; set fileName(fileName: string); private _fileName; get placeholder(): string; set placeholder(plh: string); private _placeholder; get required(): boolean; set required(req: BooleanInput); private _required; get disabled(): boolean; set disabled(value: BooleanInput); private _disabled; get readonly(): boolean; set readonly(value: BooleanInput); private _readonly; get errorState(): boolean; set errorState(value: boolean); private _errorState; get empty(): boolean; accept: string; userAriaDescribedBy: string; /** * @deprecated This input will be removed in future versions. `MxFileUploaderIntlService` will handle all labels for i18n. */ uploadLabel: DeprecatedString; isShowImgPreview: boolean; id: string; class: string; onClear: EventEmitter; onUpload: EventEmitter; constructor(ngControl: NgControl, fb: FormBuilder, elRef: ElementRef, renderer: Renderer2, viewContainerRef: ViewContainerRef); ngDoCheck(): void; ngOnDestroy(): void; setDescribedByIds(ids: string[]): void; setDisabledState(isDisabled: boolean): void; onContainerClick(event: MouseEvent): void; registerOnChange(fn: (value: any) => void): void; registerOnTouched(fn: () => void): void; writeValue(data: File): void; onFocusIn(event: FocusEvent): void; onFocusOut(event: FocusEvent): void; onFileSelected(target: any): void; onClearFile(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_isShowImgPreview: unknown; } declare class MxFileUploaderValidators { static fileTypes(fileTypes: string): ValidatorFn; static maxFileSize(fileSize: number): ValidatorFn; } export { MX_FILE_UPLOADER_INTL_PROVIDER, MxFileUploaderComponent, MxFileUploaderIntlService, MxFileUploaderValidators }; export type { MxFileUploaderIntlLabels };