namespace InABox.Core
{
    public class CurrencyEditor : BaseEditor, IButtonEditor
    {
        public CurrencyEditor(int digits = 2)
        {
            Visible = Visible.Default;
            Width = 70;
            Digits = digits;
            Format = string.Format("C{0}", digits);
            Alignment = Alignment.MiddleRight;
        }

        public int Digits { get; }

        public EditorButton[] Buttons { get; set; }

        protected override BaseEditor DoClone()
        {
            return new CurrencyEditor(Digits) { Buttons = Buttons };
        }
    }
}