import { ObjectUtils } from "../../../utilities/object-utils";
import { IDrawingItem, MobInfo, TreasureItem } from "../massive-darkness2.model";

export class MD2Clone {

    public static CloneDrawingItem(obj: IDrawingItem) {
        let type = obj.constructor.name;
        let cloneObj = null;
        switch (type) {
            case "TreasureItem":
                //let copy = structuredClone(obj);
                return new TreasureItem(obj['type'], 1);
                break;
            case "MobInfo":
                return new MobInfo(obj);
                break;
            default: break;
        }
        return ObjectUtils.CloneValue(obj);
    }
}