using System;
using InABox.Configuration;
using InABox.Core;
using System.Collections.Generic;

namespace InABox.Core
{
    public class CoreFilterDefinition : BaseObject, ISequenceable
    {
        [EditorSequence(1)]
        [TextBoxEditor]
        public string Name { get; set; } = "";

        [EditorSequence(2)]
        [FilterEditor]
        public string Filter { get; set; } = "";

        [NullEditor]
        public long Sequence { get; set; }

        public Filter<T>? AsFilter<T>()
        {
            return Serialization.Deserialize<Filter<T>>(Filter);
        }
    }

    public class CoreFilterDefinitions : List<CoreFilterDefinition>, IGlobalConfigurationSettings
    {
    }
    
}
