namespace Pilz.UI.Extensions;

public static class DialogResultExtensions
{
    public static bool Is(this DialogResult @this, DialogResult result)
    {
        return @this == result;
    }

    public static bool IsNot(this DialogResult @this, DialogResult result)
    {
        return @this != result;
    }

    public static bool Is(this DialogResult @this, params DialogResult[] results)
    {
        return results.Any(result => @this == result);
    }

    public static bool IsNot(this DialogResult @this, params DialogResult[] results)
    {
        return results.All(result => @this != result);
    }

    public static bool IsOk(this DialogResult @this)
    {
        return @this == DialogResult.OK;
    }

    public static bool IsNotOk(this DialogResult @this)
    {
        return @this != DialogResult.OK;
    }

    public static bool IsYes(this DialogResult @this)
    {
        return @this == DialogResult.Yes;
    }

    public static bool IsNotYes(this DialogResult @this)
    {
        return @this != DialogResult.Yes;
    }

    public static bool IsCancel(this DialogResult @this)
    {
        return @this == DialogResult.Cancel;
    }

    public static bool IsNotCancel(this DialogResult @this)
    {
        return @this != DialogResult.Cancel;
    }
}
