using InABox.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace InABox.Core
{
    /// <summary>
    /// The settings for a given <see cref="IPoster{TEntity, TSettings}"/>.
    /// </summary>
    public abstract class PosterSettings : BaseObject, IGlobalConfigurationSettings
    {
        [NullEditor]
        public string PostableType { get; set; }

        [CheckBoxEditor]
        public bool ScriptEnabled { get; set; } = false;

        [ScriptEditor]
        public string Script { get; set; } = "";

        public abstract string DefaultScript(Type TPostable);
        public string DefaultScript<TPostable>() where TPostable : Entity, IPostable
        {
            return DefaultScript(typeof(TPostable));
        }
    }

    public interface IGlobalPosterSettings : IGlobalConfigurationSettings
    {
    }
    public abstract class GlobalPosterSettings : BaseObject, IGlobalPosterSettings
    {
    }
}
