import * as i0 from '@angular/core'; import { DoCheck, OnDestroy, ElementRef } from '@angular/core'; import * as i1 from '@angular/cdk/text-field'; import { CdkTextareaAutosize } from '@angular/cdk/text-field'; import * as i1$1 from '@sbb-esta/angular/core'; import { SbbErrorStateMatcher } from '@sbb-esta/angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import { SbbFormFieldControl } from '@sbb-esta/angular/form-field'; import { Subject, BehaviorSubject } from 'rxjs'; declare class SbbTextarea implements SbbFormFieldControl, ControlValueAccessor, DoCheck, OnDestroy { ngControl: NgControl; private _changeDetectorRef; private _elementRef; get _labelCharactersRemaining(): string; /** Unique id of the element. */ private _uniqueId; get id(): string; set id(value: string); private _id; /** Id for the inner input field. */ get inputId(): string; /** * Disable the automatic labeling to avoid issues like #1918. * @docs-private */ readonly disableAutomaticLabeling = true; /** Emits when the state of the option changes and any parents have to be notified. */ readonly stateChanges: Subject; private _destroyed; private _errorStateTracker; /** The value of the textarea. */ get value(): string; set value(value: string); /** Class property that disables the textarea status. */ get disabled(): boolean; set disabled(value: boolean); private _disabled; /** Class property that sets readonly the textarea content. */ get readonly(): boolean; set readonly(value: boolean); private _readonly; /** Whether the input is in an error state. */ get errorState(): boolean; set errorState(value: boolean); /** Class property that sets the maxlength of the textarea content. */ get maxlength(): number; set maxlength(value: number); private _maxlength; /** Class property that sets the minlength of the textarea content. */ get minlength(): number; set minlength(value: number); private _minlength; /** Class property that sets required the textarea. */ get required(): boolean; set required(value: boolean); private _required; /** Whether the autosizing is disabled or not. Autosizing is based on the CDK Autosize. */ autosizeDisabled: boolean; get errorStateMatcher(): SbbErrorStateMatcher; set errorStateMatcher(value: SbbErrorStateMatcher); /** Whether the textarea is focused. */ get focused(): boolean; private _focused; /** Whether the textarea has a value. */ get empty(): boolean; /** Determines the aria-describedby to be set on the host. */ _ariaDescribedby: string; /** Class property that represents an observer on the number of digits in a textarea. */ _counter: BehaviorSubject; /** Placeholder value for the textarea. */ placeholder: string; /** @docs-private */ _textarea: ElementRef; /** Class property that automatically resize a textarea to fit its content. */ autosize: CdkTextareaAutosize; /** `View -> model callback called when value changes` */ _onChange: (value: any) => void; /** `View -> model callback called when autocomplete has been touched` */ _onTouched: () => void; constructor(...args: unknown[]); /** * Trigger resize on every check because it's possible that the textarea becomes visible after first rendering. * Without triggering resize, the textarea would not be correctly adjusted when it becomes visible only after first rendering. * This issue is due to the fact, that before being visible, autosize is deactivated. * @docs-private */ ngDoCheck(): void; /** * Forward focus if a user clicks on an associated label. * Implemented as part of SbbFormFieldControl. * @docs-private */ onContainerClick(_event: Event): void; /** * Note: under normal conditions focus shouldn't land on this element, however it may be * programmatically set, for example inside of a focus trap, in this case we want to forward * the focus to the native element. * @docs-private */ focus(options?: FocusOptions): void; /** Adds the focused CSS class to this element */ _onFocus(): void; /** * forward focus if user clicks anywhere on sbb-textarea * @docs-private */ _focusTextarea(target: Event): void; /** Removes the focused CSS class from this element */ _onBlur(): void; /** Method that listens change in the textarea content */ _onInput(event: any): void; /** Refreshes the error state of the input. */ updateErrorState(): void; writeValue(newValue: any): void; registerOnChange(fn: (_: any) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(disabled: boolean): void; /** * Implemented as part of SbbFormFieldControl. * @docs-private */ setDescribedByIds(ids: string[]): void; /** @docs-private */ ngOnDestroy(): void; /** Method that updates the max number of digits available in the textarea content */ private _updateDigitsCounter; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_disabled: unknown; static ngAcceptInputType_readonly: unknown; static ngAcceptInputType_maxlength: unknown; static ngAcceptInputType_minlength: unknown; static ngAcceptInputType_required: unknown; static ngAcceptInputType_autosizeDisabled: unknown; } declare class SbbTextareaModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { SbbTextarea, SbbTextareaModule };