// <auto-generated />
// This file is auto-generated from core/models/src/vault/Item.ts
// Do not edit this file directly. Run 'npm run generate:models' to regenerate.

package net.aliasvault.app.vaultstore.models

/**
 * Field types for rendering and validation.
 */
object FieldType {
    /**
     * Text field type.
     */
    const val TEXT = "Text"

    /**
     * Password field type.
     */
    const val PASSWORD = "Password"

    /**
     * Hidden field type.
     */
    const val HIDDEN = "Hidden"

    /**
     * Email field type.
     */
    const val EMAIL = "Email"

    /**
     * URL field type.
     */
    const val U_R_L = "URL"

    /**
     * Date field type.
     */
    const val DATE = "Date"

    /**
     * Number field type.
     */
    const val NUMBER = "Number"

    /**
     * Phone field type.
     */
    const val PHONE = "Phone"

    /**
     * TextArea field type.
     */
    const val TEXT_AREA = "TextArea"

    /**
     * All available field types.
     */
    val all = listOf(TEXT, PASSWORD, HIDDEN, EMAIL, U_R_L, DATE, NUMBER, PHONE, TEXT_AREA)

    /**
     * Checks if a string value is a valid field type.
     */
    fun isValid(value: String?): Boolean {
        return value in all
    }
}
