var Row = Namespace.declare("com.twitter.Bootstrap.Grid",
    class Row extends UcpComponent {
        static get implements() {
            return [];
        }

        static get overwriteServerDescriptor() {
            return true;
        }

        static get dependencies() {
            return [
                "/EAMD.ucp/Components/org/lesscss/Less/3.8.1/Less.component.xml",
            ];
        }

        static get weBeanUnitPaths() {
            return [
				"./src/html/weBeans/Row.weBean.html"
			];
        }

        static start() {
			UcpComponentSupport.importLink(this.IOR.loader.basePath + "/src/less/"+this.name+".less", "stylesheet/less", "text/css");		
		}

        constructor() {
            super();
        }

        init() {
            super.init();

            const demoModel = {
                name: "Row",
                description: "",
                badge: ""
            };
            this.model = demoModel;
            this.model.autoUpdate = true;
            this.actionIndex = Thinglish.createActionIndexOf(Row, this);
            return this;
        }

        onDomReady(view) {
        }

        updateView(view, updateObject) {
        }

        handleSelection(event, item) {
            Action.do(DetailsView.ACTION_SHOW, this);
        }

        startSelectWorkflow() {
            console.info(this.constructor.name, "startSelectWorkflow");
        }

        assign() {
            console.info(this.constructor.name, "assign");
        }

        setEmpty() {
            console.info(this.constructor.name, "setEmpty");
        }
    }
);

/*
var RowItemView = Namespace.declare("tla.EAM.layer5",
    class RowItemView extends UcpView {
        static get implements() { return [ItemView]; }

        init(ucpComponent) {
            super.init(ucpComponent);
            this.badge = "some Value";
            return this;
        }

        update(updateObject) {
            console.info("ucpView update", this.id, ...arguments);
            if (!updateObject) {
                return;
            }
            Object.keys(updateObject).forEach(
                member => {
                    switch (member) {
                        case "badge":
                            //update something for badge
                            break;
                        case "attribute1":
                            //update something for attribute1
                            break;
                        default:
                            //update something in any case
                    }
                }
            );
        }

    }
);


var RowDetailsView = Namespace.declare("tla.EAM.layer5",
    class RowDetailsView extends UcpView {
        static get implements() { return [DetailsView]; }

        init(ucpComponent) {
            super.init(ucpComponent);

            return this;
        }

        update(updateObject) {
            console.info("ucpView update", this.id, ...arguments);
        }

        onInitDetails() {
            console.info("ucpView onInitDetails", this.id, ...arguments);
            this.details.model.heading += " also from DetailsView";

        }

    }
);

*/