import { EventEmitter } from '../../stencil-public-runtime';
import { FormControlOption, FormValidateResult, VegaFormFieldValidationState } from './types';
import { GlobalSlimmers } from '../../vega-slimmer/vega-slimmer-core';
import { EventEmitSlimmerBase } from '../../helpers/event-manager/slimmers/event-emit-slimmer';
import { ChildNodesEventPreventSlimmer } from '../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer';
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
import { SubStateNotifySlimmerBase } from '../../helpers/slimmers/sub-state/sub-state-notify-slimmer-base';
import { VegaFormNestStateController } from './slimmers/controllers/vega-form-nest-state-controller';
import { VegaFormFieldValidationStateController } from './slimmers/controllers/vega-form-field-validation-state-controller';
import { NativeFormRenderer } from './slimmers/renderers/native-form-renderer';
import { VegaFormSubmitController } from './slimmers/controllers/vega-form-submit-controller';
import { VegaFormFieldController } from './slimmers/controllers/vega-form-field-controller';
import { VegaFormResetController } from './slimmers/controllers/vega-form-reset-controller';
/**
 * @vegaVersion 1.3.0
 */
export declare class VegaForm {
  protected readonly globalSlimmers: GlobalSlimmers;
  protected submitEventEmitter: EventEmitSlimmerBase;
  protected resetEventEmitter: EventEmitSlimmerBase;
  protected validateEventEmitter: EventEmitSlimmerBase;
  protected readonly disableBlurValidationNotifySlimmer: SubStateNotifySlimmerBase;
  protected stateController: VegaFormNestStateController;
  protected childEventPrevent: ChildNodesEventPreventSlimmer;
  protected childFormValidateEventPrevent: ChildNodesEventPreventSlimmer;
  protected vegaComponentUsageRuntimeMetricsSlimmer: VegaComponentUsageRuntimeMetricsSlimmer<HTMLVegaFormElement>;
  protected vegaFormFieldValidationStateController: VegaFormFieldValidationStateController;
  protected nativeFormRenderer: NativeFormRenderer;
  protected vegaFormSubmitController: VegaFormSubmitController;
  protected vegaFormResetController: VegaFormResetController;
  protected vegaFormFieldController: VegaFormFieldController;
  host: HTMLVegaFormElement;
  /**
   * Indicates whether the current form-controlled elements are valid.
   *
   * Form-controlled elements are considered for validation if they
   *    have the `data-vega-form` property.
   *
   * Disabled and invisible elements are excluded from validation.
   *
   * If the value is `undefined`, it means there are no
   *    form-controlled elements that can be validated.
   *
   * **Additional Notes:**
   *   1. When depending on `isValid` for form validation, it is advised
   *      not to modify the following properties of the monitored DOM:
   *      - `disabled` property
   *      - Element visibility style
   *   2. As this property relies heavily on the `VegaValidate` event emitted,
   *      it is highly recommended to enable auto-validation for all
   *      form-controlled elements to ensure that the value reflects
   *      the most up-to-date form validation status.
   *
   * @vegaVersion 1.3.0
   */
  isValid: boolean | null;
  watchIsValid(): void;
  /**
   * Indicates whether the value of any current
   *    form-controlled elements has been changed.
   *
   *   1. When the value of any form-controlled element is changed,
   *      this parameter is set to `true`.
   *   2. When resetting the form, this parameter is set to `false`.
   *   3. When invoking the `setValue` method, this parameter is set to `false`.
   *
   * @vegaVersion 1.3.0
   */
  isTouched: boolean;
  /**
   * Specifies whether form validation should be disabled on blur events of form elements.
   *
   *  - This helps prevent validation on blur when clicking Submit inside an input,
   *        avoiding error messages that shift the button and block the click.
   *  - For nested forms, the parent form will override this property
   *        to ensure consistent validation behavior.
   *
   * @vegaVersion 2.47.0
   */
  disableBlurValidation: boolean;
  watchDisableBlurValidation(): void;
  /**
   * Determines whether the `vega-form` content is wrapped in a native HTML <form> element.
   *
   * @vegaVersion 2.64.0
   */
  useNativeForm: boolean;
  /**
   * Specifies the HTTP URL for form submission.
   *    This property takes effect only when {@link useNativeForm} is set to `true`.
   *
   * @vegaVersion 2.64.0
   */
  action: string;
  /**
   * Specifies the HTTP method used for form submission.
   *   This property takes effect only when {@link useNativeForm} is set to `true`.
   *
   * @vegaVersion 2.64.0
   */
  method: 'post' | 'get';
  /**
   * An event emitter notifying the change in the validation result.
   *
   * @vegaVersion 1.9.1
   */
  vegaValidate: EventEmitter<boolean>;
  /**
   * An event emitter notifying the change in the validation result.
   *
   * @eventSemantics namespace:native
   * @vegaVersion 2.0.0
   */
  validate: EventEmitter<boolean>;
  /**
   * An event emitter notifying the submission of the form.
   *
   * @vegaVersion 1.24.0
   */
  vegaFormSubmit: EventEmitter<unknown>;
  /**
   * An event emitter notifying the submission of the form.
   *
   * @eventSemantics namespace:native
   * @vegaVersion 2.0.0
   */
  formSubmit: EventEmitter<unknown>;
  /**
   * An event emitter notifying the reset of the form.
   *
   * @vegaVersion 1.24.0
   */
  vegaFormReset: EventEmitter;
  /**
   * An event emitter notifying the reset of the form.
   *
   * @eventSemantics namespace:native
   * @vegaVersion 2.0.0
   */
  formReset: EventEmitter;
  /**
   * Invoke this method asynchronously to retrieve the validation result for
   *    all the vega field elements nested within the `vega-form`.
   *
   * If an element is a `vega-form` itself, it will recursively
   *    invoke its `valid()` method.
   *
   * @param {boolean | 'rule'} showError determine whether the validation result should be reflected in UI
   * @return {Promise<FormValidateResult> } validation result
   * @vegaVersion 1.3.0
   */
  valid(showError?: boolean | 'rule'): Promise<FormValidateResult>;
  /**
   * Invoke this method asynchronously to retrieve the values for
   *    all the available vega field elements nested within the `vega-form`.
   *
   * @param {FormControlOption} [option] form control option to skip disabled/invisible components
   * @return {Promise<T>} object with key and field value as key-value pair
   * @vegaVersion 1.3.0
   */
  getValue<T>(option?: FormControlOption): Promise<T>;
  /**
   * Invoke this method to prefill the `vega-form` with the given value.
   *
   * This action will also set the `isTouched` property to `false`.
   *
   * @param value to prefill into the vega-form
   * @param {FormControlOption} [option] form control option to skip disabled/invisible components
   * @vegaVersion 1.3.0
   */
  setValue<T>(value: T, option?: FormControlOption): Promise<void>;
  /**
   * Invoke this method to reset the vega field elements in the form to
   *    the default value provided, or an empty string if
   *    no default value is found.
   *
   * @param defaultValueMap map of the vega form field name to default value
   * @param {FormControlOption} [option] form control option to skip disabled/invisible components
   *
   * @vegaVersion 1.3.0
   */
  reset(defaultValueMap?: unknown, option?: FormControlOption): Promise<void>;
  /**
   * Invoke this method to set validation states on specific form fields.
   *
   * @param {VegaFormFieldValidationState[]} states - An array of validation error objects.
   *
   * @vegaVersion 2.59.0
   */
  setValidationStates(states: VegaFormFieldValidationState[]): Promise<void>;
  render(): VegaForm;
}
