(()=>{function e(t,n,r,a,o,l,u,e){function c(e){return a.save(e).then(o.getResData).then(function(e){return n.saveSuccess("Rule"),e})}t.rule=e&&_.cloneDeep(e)||{},(e=t.rule).fragmentType=e.fragmentType||"*",e.type=e.type||"*",e.source=e.source||"*",t.saveWithConfirmation=function(e){return r({title:l("Create rule"),body:u.getString("You are about to create a rule which will permanently delete corresponding data after {{maximumAge}} days (executed at night). Do you want to proceed?",e),size:"sm",labels:{ok:l("Create")}}).then(_.partial(c,e)).then(t.$close)}}e.$inject=["$scope","c8yAlert","c8yModal","c8yRetentions","c8yBase","gettext","gettextCatalog","rule"],angular.module("c8y.ui").controller("editRetentionRuleCtrl",e)})();