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

import Foundation

/// Field types for rendering and validation.
public struct FieldType {
    /// Text field type.
    public static let text = "Text"

    /// Password field type.
    public static let password = "Password"

    /// Hidden field type.
    public static let hidden = "Hidden"

    /// Email field type.
    public static let email = "Email"

    /// URL field type.
    public static let uRL = "URL"

    /// Date field type.
    public static let date = "Date"

    /// Number field type.
    public static let number = "Number"

    /// Phone field type.
    public static let phone = "Phone"

    /// TextArea field type.
    public static let textArea = "TextArea"

    /// All available field types.
    public static let all = [text, password, hidden, email, uRL, date, number, phone, textArea]

    /// Checks if a string value is a valid field type.
    public static func isValid(_ value: String?) -> Bool {
        guard let value = value else { return false }
        return all.contains(value)
    }
}
