(()=>{function t(e,o,n,c,r){var i=this;_.assign(i,{remove:function(t){return o({title:c("Delete subscription"),body:r.getString('You are about to delete subscription "{{connectorName}}". Do you want to proceed?',_.get(t,"_c8y_BrokerSource")),status:"danger",labels:{ok:c("Delete")}}).then(function(){e.remove(t)}).then(function(){return e.setStatus(i.acceptedSubscription,!1)}).then(i.onReload).then(function(){n.success(c("Subscription deleted."))})},toggleSubscriptionStatus:function(t){t.stopPropagation(),t.preventDefault(),e.setStatus(i.acceptedSubscription,!i.acceptedSubscription.userEnabled).then(function(t){i.acceptedSubscription=t})}})}t.$inject=["c8yDataBrokerSubscriptionsService","c8yModal","c8yAlert","gettext","gettextCatalog"],angular.module("c8y.dataBroker").component("c8yDataBrokerSubscription",{controller:t,controllerAs:"vm",templateUrl:":::PLUGIN_PATH:::/subscriptions/subscription.html",bindings:{acceptedSubscription:"<",onReload:"&"}})})();