(()=>{function e(t,i,o,n,e,r){var p=["c8ySchema!!id","c8ySchema!!name","c8ySchema!!type"];function c(e){t.deviceTypes=_(e).map("type").filter(_.indentity).uniq().value()}function s(){t.forms.componentForm.$setValidity("propertySelected",0<_.filter(t.config.options.properties,"__active").length)}t.config.options=t.config.options||{},t.config.options.properties=t.config.options.properties||[],t.defaultProperties=t.config.options.properties&&_.map(t.config.options.properties,"id")||p,e.list().then(angular.bind(r,r.filterAndExtendWithStoredProperties,t.config.options.properties)).then(function(e){t.properties=e}),s(),t.$watch("config.device",function(e){e&&i.all([n.detail(e).then(o.getResData),n.childDevices(e),n.childAssets(e)]).then(_.flattenDeep).then(c)}),t.$watch("properties",function(e){t.config.options.properties=_.map(e,function(e){var t=["id","label","config","renderType","renderConfig","isAction","__active","computed","type","keyPath"];return e.id&&"c8yCustom"===_.head(e.id.split("!!"))&&(t.push("properties"),t.push("printFormat")),_.pick(e,t)}),s()},!0)}e.$inject=["$scope","$q","c8yBase","c8yInventory","c8yPropertiesLibrary","assetsSvc"],angular.module("c8y.assets").controller("AssetsTableConfigCtrl",e)})();