(()=>{function e(n,e,i,t,s,r,c,o){var a=this,d=c.getThisMonth(),l={required:o("This field is required.")};function u(e){a.isAdmin=e}function v(){var e=n.resolve();return e="comarch"!==a.provider?t.getSms(i.deviceId,{},d).then(m):e}function m(e){return a.smss=e.entries,a.smss}function f(){var e=o("SMS sent.");return a.message.text="",s.success(e)}e.invalid=_.bind(r.invalid,r,e.forms,"messageForm"),_.assign(a,{$onInit:function(){o("Delivered"),o("Received"),o("Pending"),o("Failed")},$onChanges:function(e){_.get(e,"available.currentValue")&&(v(),c.isAdmin().then(u))},sendSms:function(e){return t.sendSms(i.deviceId,e).then(v).then(f)},validationHints:function(e){return r.validationHints(e,l)}})}e.$inject=["$q","$scope","$routeParams","c8yConnectivity","c8yAlert","c8yBase","connectivityService","gettext"],angular.module("c8y.connectivityV2").component("c8yConnectivitySms",{controller:e,controllerAs:"vm",templateUrl:":::PLUGIN_PATH:::/sms.html",bindings:{available:"<",provider:"<"}})})();