// <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.

#nullable enable

namespace AliasClientDb.Models;

/// <summary>
/// Field types for rendering and validation.
/// </summary>
public static class FieldType
{
    /// <summary>
    /// Text field type.
    /// </summary>
    public const string Text = "Text";

    /// <summary>
    /// Password field type.
    /// </summary>
    public const string Password = "Password";

    /// <summary>
    /// Hidden field type.
    /// </summary>
    public const string Hidden = "Hidden";

    /// <summary>
    /// Email field type.
    /// </summary>
    public const string Email = "Email";

    /// <summary>
    /// URL field type.
    /// </summary>
    public const string URL = "URL";

    /// <summary>
    /// Date field type.
    /// </summary>
    public const string Date = "Date";

    /// <summary>
    /// Number field type.
    /// </summary>
    public const string Number = "Number";

    /// <summary>
    /// Phone field type.
    /// </summary>
    public const string Phone = "Phone";

    /// <summary>
    /// TextArea field type.
    /// </summary>
    public const string TextArea = "TextArea";

    /// <summary>
    /// All available field types.
    /// </summary>
    public static readonly string[] All = { Text, Password, Hidden, Email, URL, Date, Number, Phone, TextArea };

    /// <summary>
    /// Checks if a string value is a valid field type.
    /// </summary>
    /// <param name="value">The value to check.</param>
    /// <returns>True if the value is a valid field type.</returns>
    public static bool IsValid(string? value)
    {
        return value == Text || value == Password || value == Hidden || value == Email || value == URL || value == Date || value == Number || value == Phone || value == TextArea;
    }
}
