using System;
using System.Collections.Generic;
using System.Text;

namespace InABox.Core
{
    public class DimensionsEditor : BaseEditor
    {
        public Type DimensionsType { get; set; }

        public bool AllowEditingUnit { get; set; } = true;

        public DimensionsEditor(Type dimensionsType)
        {
            if (!typeof(IDimensions).IsAssignableFrom(dimensionsType))
            {
                throw new ArgumentException("Type must be an IDimensions", nameof(dimensionsType));
            }
            DimensionsType = dimensionsType;
        }

        protected override BaseEditor DoClone()
        {
            return new DimensionsEditor(DimensionsType)
            {
                AllowEditingUnit = AllowEditingUnit
            };
        }
    }
}
