using System;
using System.ComponentModel;
using OpenCvSharp;

namespace OpenCVStudio_v0
{
    public sealed class AlignImageProperties
    {
        private readonly ProjectManager projectManager;
        private readonly ProjectBlock block;

        public AlignImageProperties(ProjectManager projectManager, ProjectBlock block)
        {
            this.projectManager = projectManager;
            this.block = block;
        }

        [Category("Информация")]
        [DisplayName("Название")]
        [ReadOnly(true)]
        public string Name => block.Name;

        [Category("Преобразование")]
        [DisplayName("Интерполяция")]
        public InterpolationFlags Interpolation
        {
            get => projectManager.GetBlockParameter(block.Id, "Interpolation", InterpolationFlags.Linear);
            set => projectManager.SetBlockParameter(block.Id, "Interpolation", value);
        }

        [Category("Преобразование")]
        [DisplayName("Заполнение")]
        [ReadOnly(true)]
        public string BorderColor => "Белый (255,255,255)";
    }
}