"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EditableField = void 0;
const internal_1 = require("../internal");
/**
* Represents an editable field.
* @extends Field
*/
class EditableField extends internal_1.Field {
/**
* Creates an instance of EditableField.
* @param {string} id The ID of the editable field.
*/
constructor(id) {
super();
this.setId(id);
}
/**
* Gets the placeholder value of the editable field.
* @returns {string} The placeholder value.
*/
getPlaceholder() {
return this.placeholder;
}
/**
* Sets the placeholder value of the editable field.
* @param {string} placeholder The placeholder value to set.
* @returns The current instance of the EditableField class.
*/
setPlaceholder(placeholder) {
this.placeholder = placeholder;
return this;
}
/**
* Gets the required flag of the editable field.
* @returns {boolean} The required flag value.
*/
getRequired() {
return this.required;
}
/**
* Sets the required flag of the editable field.
* @param {boolean} required The required flag value to set.
* @returns The current instance of the EditableField class.
*/
setRequired(required) {
this.required = required;
return this;
}
/**
* Gets the client error message of the editable field.
* @returns {string} The client error message.
*/
getClientErrorMessage() {
return this.clientErrorMessage;
}
/**
* Sets the client error message of the editable field.
* @param {string} clientErrorMessage The client error message to set.
* @returns The current instance of the EditableField class.
*/
setClientErrorMessage(clientErrorMessage) {
this.clientErrorMessage = clientErrorMessage;
return this;
}
/**
* Gets the server error message of the editable field.
* @returns {string} The server error message.
*/
getServerErrorMessage() {
return this.serverErrorMessage;
}
/**
* Sets the server error message of the editable field.
* @param {string} serverErrorMessage The server error message to set.
* @returns The current instance of the EditableField class.
*/
setServerErrorMessage(serverErrorMessage) {
this.serverErrorMessage = serverErrorMessage;
return this;
}
/**
* Gets the auto submit flag of the editable field.
* @returns {boolean} The auto submit flag value.
*/
getAutoSubmit() {
return this.autoSubmit;
}
/**
* Sets the auto submit flag of the editable field.
* @param {boolean} autoSubmit The auto submit flag value to set.
* @returns The current instance of the EditableField class.
*/
setAutoSubmit(autoSubmit) {
this.autoSubmit = autoSubmit;
return this;
}
}
exports.EditableField = EditableField;