using Microsoft.AspNetCore.Components;

namespace Guestlist.Components.Pages;

public partial class GuestAccess
{
    [SupplyParameterFromQuery(Name = "error")]
    public string? Error { get; set; }

    protected string? ErrorMessage => Error switch
    {
        "invalid" => "Invalid access code.",
        "service" => "Access code validation failed. Please try again.",
        _ => null
    };
}
