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

namespace InABox.Core
{
    /// <summary>
    /// The global settings for an <see cref="IPostable"/>.
    /// </summary>
    public class PostableSettings : BaseObject, IGlobalConfigurationSettings
    {
        [NullEditor]
        public string PostableType { get; set; } = "";

        /// <summary>
        /// What kind of <see cref="IPoster{TEntity, TSettings}"/> is to be used, globally; this will be a type name.
        /// </summary>
        [ComboLookupEditor(typeof(PosterTypeLookup))]
        [EditorSequence(1)]
        public string? PosterType { get; set; }

        [TextBoxEditor]
        [EditorSequence(2)]
        public string? ButtonName { get; set; }

        [EditorSequence(3)]
        public ImageDocumentLink Thumbnail => InitializeField(ref _thumbnail, nameof(Thumbnail));
        private ImageDocumentLink? _thumbnail;

        [EditorSequence(4)]
        [CheckBoxEditor]
        public bool ShowClearButton { get; set; } = true;

        [EditorSequence(5)]
        [CheckBoxEditor]
        [Caption("Show Import Button")]
        public bool ShowPullButton { get; set; } = true;
    }
}
