angular.module("c8y.propertiesLibrary").component("c8yJsonSchemaObjectEditor",{bindings:{_jsonSchemaObject:"<jsonSchemaObject",onSave:"&",onRemove:"&",onCancel:"&"},templateUrl:":::PLUGIN_PATH:::/jsonSchemaObjectEditor.html",controller:function(){var c=this;_.assign(c,{$onChanges:function(e){e._jsonSchemaObject&&(c.jsonSchemaObject=_.cloneDeep(c._jsonSchemaObject))},onSchemaChange:function(e){var n;c.jsonSchemaObject&&(n=_.first(_.keys(e.properties)),n=_.get(e,["properties",n,"title"],""),_.set(c.jsonSchemaObject,"name",n),_.assign(c.jsonSchemaObject.c8y_JsonSchema,e))},save:function(){c.onSave({jsonSchemaObject:c.jsonSchemaObject,originalJsonSchemaObject:c._jsonSchemaObject})},remove:function(){c.onRemove({jsonSchemaObject:c.jsonSchemaObject})},cancel:function(){c.onCancel()}})},controllerAs:"vm"});