import * as _angular_core from '@angular/core';
import { InjectionToken, Signal, AfterContentInit, AfterContentChecked, OnChanges, OnInit, OnDestroy, ElementRef, SimpleChanges, Provider, DoCheck, ModuleWithProviders } from '@angular/core';
import * as _angular_forms from '@angular/forms';
import { AbstractControl, FormGroup, NgControl, RequiredValidator } from '@angular/forms';
import { Breakpoints } from '@siemens/element-ng/resize-observer';
import { TranslatableString } from '@siemens/element-translate-ng/translate';
import * as _siemens_element_ng_form from '@siemens/element-ng/form';
import * as _angular_forms_signals from '@angular/forms/signals';
import { SignalFormsConfig } from '@angular/forms/signals';
/**
* Copyright (c) Siemens 2016 - 2026
* SPDX-License-Identifier: MIT
*/
/**
* Interface for form error mapper.
* It resolves a key to either a translatable string or function
* which is called with the validation error for its key and should return a translatable string.
*/
interface SiFormValidationErrorMapper {
required?: TranslatableString | ((error: {
required: boolean;
}) => TranslatableString);
requiredTrue?: TranslatableString | ((error: {
required: boolean;
}) => TranslatableString);
email?: TranslatableString | ((error: {
email: boolean;
}) => TranslatableString);
min?: TranslatableString | ((error: {
min: number;
actual: number;
}) => TranslatableString);
max?: TranslatableString | ((error: {
max: number;
actual: number;
}) => TranslatableString);
minLength?: TranslatableString | ((error: {
requiredLength: number;
actualLength: number;
}) => TranslatableString);
maxLength?: TranslatableString | ((error: {
requiredLength: number;
actualLength: number;
}) => TranslatableString);
pattern?: TranslatableString | ((error: {
pattern: string | RegExp;
}) => TranslatableString);
numberFormat?: TranslatableString | ((error: {
numberFormat: boolean;
}) => TranslatableString);
dateFormat?: TranslatableString | ((error: {
format: string;
}) => TranslatableString);
maxDate?: TranslatableString | ((error: {
max: Date;
actual: Date;
}) => TranslatableString);
minDate?: TranslatableString | ((error: {
min: Date;
actual: Date;
}) => TranslatableString);
[key: string]: undefined | string | ((error: any) => string);
}
interface SiFormValidationError {
controlName?: string;
controlNameTranslationKey?: string;
errorCode: TranslatableString;
errorCodeTranslationKey?: string;
errorParams?: any;
}
/**
* @deprecated This component should no longer be used.
*
* When providing a form wide error mapper, use the {@link provideFormValidationErrorMapper}.
* ```ts
* import { provideFormValidationErrorMapper } form '@siemens/element-ng/forms'
*
* @Component({
* template: `
`
* providers: [provideFormValidationErrorMapper({
* 'name.required': 'CUSTOM_REQUIRED_ERROR'
* })]
* })
* class MyFormComponent {}
* ```
*
* When using the column layout, use the `form-col-layout` classes.
*
* ```html
*
*
*
*
* ```
*
* For a custom breakpoint use the SCSS mixin:
*
* ```scss
* @use '@siemens/element-theme/src/styles/bootstrap/mixins/form-layout';
*
* // Custom responsive breakpoint
* .custom-form-col-layout {
* // Above 400px the column layout is used
* @include form-layout.responsive-form-col-layout(400px);
* }
* ```
*/
declare class SiFormContainerComponent {
/**
* Set the form entity to the container to enable the overall form validation on in
* the form container edit panel.
*/
readonly form: _angular_core.InputSignal | undefined>;
/**
* A form container in readonly mode is only displaying the form content without ability
* to change it. The edit panel with typically save and cancel buttons is hidden. Set
* to true to display the edit panel.
*
* @defaultValue false
*/
readonly readonly: _angular_core.InputSignalWithTransform;
/**
* The container hosts the form within a siResizeContainer to configure the breakpoint for
* different screen sizes. Optionally, change the container breakpoints with the contentContainerBreakpoints
* input.
*/
readonly contentContainerBreakpoints: _angular_core.InputSignal;
/**
* In some scenarios, one may not want the form container to be responsible for the layout relevant
* `si-container-[xs|...]` classes, but let this be done by a different, nested component, e.g. by a
* group box. In these cases, the property should be set to true.
*
* @defaultValue false
*/
readonly disableContainerBreakpoints: _angular_core.InputSignalWithTransform;
/**
* Every validation error has an errorCode. This map holds translate keys for error codes. The keys can
* be used to display a translated message for each validation error. The defaults old english readable
* key defaults for the Angular standard validators of the `Validators` class like `min`, `max` or `required`.
*
* Use the input to set your own translate keys for the form validators you need.
*/
readonly errorCodeTranslateKeyMap: _angular_core.InputSignal | undefined>;
/**
* A map the maps from control names of the form to their translate keys.
* The initial map is empty and the user is responsible to add the required
* translate keys.
*
* @defaultValue
* ```
* new Map()
* ```
*/
readonly controlNameTranslateKeyMap: _angular_core.InputSignal