using Meezi.Core.Entities;

namespace Meezi.API.Security;

public static class PublicCafeGuard
{
    public static (bool Ok, string? ErrorCode, string? Message) EnsureAcceptingPublicTraffic(Cafe cafe)
    {
        if (cafe.IsSuspended)
            return (false, "CAFE_SUSPENDED", "This café is temporarily unavailable.");

        if (cafe.DeletedAt is not null)
            return (false, "NOT_FOUND", "Cafe not found.");

        return (true, null, null);
    }
}
