(()=>{function t(e,a,n){var r=a.url("service/sslmanagement");return{getCertificate:function(){var t={url:"".concat(r,"/meta"),method:"GET",silentError:!0};return e(t).then(a.getResData)},activateCertificate:function(){var t={url:"".concat(r,"/activate"),method:"PUT",silentError:!0};return e(t).then(a.getResData)},deactivateCertificate:function(){var t="".concat(r,"/deactivate");return e.put(t).then(a.getResData)},deleteCertificate:function(){return e.delete("".concat(r,"/"))},saveCertificate:function(t,e){return(_.get(e,"activated")?t=>(t={url:"".concat(r,"/"),method:"PUT",headers:{"Content-Type":"multipart/form-data",Accept:"application/json"},file:t},n.upload(t)):t=>(t={url:"".concat(r,"/"),method:"POST",headers:{"Content-Type":"multipart/form-data",Accept:"application/json"},file:t},n.upload(t)))(t)},hasCustomLoadBalancer:function(){return e.get("".concat(r,"/customloadbalancer"),{cache:!0,silentError:!0}).then(function(t){return t.data}).catch(_.constant(!1))},getDnsEntry:function(){var t={url:"".concat(r,"/dnsentry"),method:"GET",silentError:!0,headers:{Accept:"text/plain"}};return e(t).then(a.getResData)}}}t.$inject=["$http","c8yBase","$upload"],angular.module("c8y.enterpriseEdition").factory("manageCertificateSvc",t)})();