using System;

namespace InABox.Core
{
    public class DigitalFormLink : EntityLink<DigitalForm>
    {
        [EditorSequence(1)]
        [CodePopupEditor(typeof(DigitalForm))]
        public override Guid ID { get; set; }

        [UniqueCodeEditor(Editable = Editable.Hidden)]
        [EditorSequence(1)]
        public string Code { get; set; }

        [EditorSequence(3)]
        [TextBoxEditor(Editable = Editable.Hidden)]
        public string Description { get; set; } = "";

        [EditorSequence(4)]
        [TextBoxEditor(Editable = Editable.Hidden)]
        public string AppliesTo { get; set; }

        [EditorSequence(5)]
        [CheckBoxEditor(Editable = Editable.Hidden)]
        public bool Secure { get; set; }

        [EditorSequence(6)]
        [CheckBoxEditor(Editable = Editable.Hidden)]
        public bool Final { get; set; }

        [EditorSequence(7)]
        [CheckBoxEditor(Editable = Editable.Hidden)]
        public bool Active { get; set; }
        
        [NullEditor]
        public DigitalFormGroupLink Group => InitializeField(ref _group, nameof(Group));
        private DigitalFormGroupLink _group;
        
        [NullEditor]
        public string DescriptionExpression { get; set; }

        // [NullEditor]
        // public int ActiveFormsCount { get; set; }
        //
        // [NullEditor]
        // public int ActiveMobileFormsCount { get; set; }
    }
}