using System;
using Autodesk.Revit.DB;

namespace RevitEstimate.Models
{
    public class ElementMeasurement : ICloneable
    {
        public Element Element { get; set; }
        private Document _doc;
        public string ElementId => Element?.Id.ToString() ?? "";
        public string Category => Element?.Category?.Name ?? "";
        public string Family => (Element as FamilyInstance)?.Symbol?.FamilyName ?? "";
        public string Type => Element?.Name ?? "";
        public string Level { get; set; }
        public string EstimateItem { get; set; }
        public string Unit { get; set; }
        public double No { get; set; } = 1.0;
        public double L { get; set; }
        public double B { get; set; }
        public double D_H { get; set; }
        public double Qty { get; set; }

        public ElementMeasurement(Element element, Document doc)
        {
            Element = element;
            _doc = doc;
            Level = "Level 1"; 
        }
        private ElementMeasurement() { }
        public object Clone() => this.MemberwiseClone();
    }
}