function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,e){var t;if(r)return"string"==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t={}.toString.call(r).slice(8,-1))&&r.constructor?r.constructor.name:t)||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,e):void 0}function _arrayLikeToArray(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function _iterableToArrayLimit(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,l,a,i=[],u=!0,c=!1;try{if(l=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=l.call(t)).done)&&(i.push(n.value),i.length!==e);u=!0);}catch(r){c=!0,o=r}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}function _arrayWithHoles(r){if(Array.isArray(r))return r}angular.module("c8y.deviceControl.relay").directive("c8yRelayControl",function(){return{restrict:"E",scope:{device:"&",suppressAlerts:"&",onSuccess:"&",onError:"&"},controller:"c8yRelayControlCtrl",controllerAs:"ctrl",templateUrl:":::PLUGIN_PATH:::/relayControl/relayControl.html",link:function(r,e,t,n){var o=_slicedToArray(e.find("input"),1)[0];n.buttonChecked=function(){return o.checked}}}});