var __awaiter=this&&this.__awaiter||function(e,n,t,r){function o(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r["throw"](e))}catch(e){a(e)}}function c(e){e.done?t(e.value):o(e.value).then(i,s)}c((r=r.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(n){return c([e,n])}}function c(i){if(r)throw new TypeError("Generator is already executing.");while(t)try{if(r=1,o&&(a=i[0]&2?o["return"]:i[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;if(o=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;o=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=n.call(e,t)}catch(e){i=[6,e];o=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-102043e0.js";import{C as CookieStorage}from"./cookie-647f9dc7.js";import{p as prod}from"./services-fc4ce8f3.js";import{D as DamgaApi}from"./damga-api-ad633a02.js";import"./kimlikApi-ac700c81.js";import"./data-transfer-field-918730a3.js";import"./BaseField-461b6d0c.js";import"./filter-cbaa3d7d.js";import"./_commonjsHelpers-27f122dd.js";var devingenProductDamgaDomainTableListDnsRecordCss=".sc-devingen-product-damga-domain-table-list-dns-record-h{display:block;padding:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";var damgaProxyIPs={"18.192.241.137":"eu-central-2.damga.devingen.io","52.29.141.76":"eu-central-1a.damga.devingen.io"};var DevingenProductDamgaDomainTableListDnsRecord=function(){function e(e){registerInstance(this,e)}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,t;return __generator(this,(function(r){switch(r.label){case 0:e=(new CookieStorage).getAll().jwt;n={Authorization:e?"Bearer "+(new CookieStorage).getAll().jwt:undefined};return[4,new DamgaApi(prod.damga+"/"+prod.base,n).getDnsRecord(this.item.domain).catch((function(e){console.log("Getting dns record failed",e)}))];case 1:t=r.sent();if(!t)return[2];this.dnsRecord=t;return[2]}}))}))};e.prototype.render=function(){var e,n;return h(Host,null,damgaProxyIPs[(e=this.dnsRecord)===null||e===void 0?void 0:e.record]||((n=this.dnsRecord)===null||n===void 0?void 0:n.record)||"-")};return e}();DevingenProductDamgaDomainTableListDnsRecord.style=devingenProductDamgaDomainTableListDnsRecordCss;export{DevingenProductDamgaDomainTableListDnsRecord as devingen_product_damga_domain_table_list_dns_record};