import { FieldModel } from "./field-model";

/**
 * Wrapper object that provides the main functionality to work with a field.
 *
 * @export
 * @interface FieldWrapper
 */
export interface FieldWrapper {
    /**
     * The model that contains information about the field how should be represented.
     *
     * @type {FieldModel}
     * @memberof FieldWrapper
     */
    fieldModel: FieldModel;

    /**
     * Updates the field value.
     *
     * @param {*} value
     * @memberof FieldWrapper
     */
    writeValue(value: any);

    /**
     * Retrieves current field's value.
     *
     * @returns {*}
     * @memberof FieldWrapper
     */
    getValue(): any;
}
