import { r as registerInstance, h, H as Host } from './index-ecdfb761.js';

const damgaDnsRecordCss = "damga-dns-record{display:block;padding:6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}";

const damgaProxyIPs = {
  '18.192.241.137': 'eu-central-2.damga.devingen.io',
  '52.29.141.76': 'eu-central-1a.damga.devingen.io',
};
const DamgaDnsRecord = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  async componentWillLoad() {
    // const jwt = new CookieStorage().getAll().jwt;
    // const headers = {
    //   Authorization: jwt ? `Bearer ${new CookieStorage().getAll().jwt}` : undefined,
    // };
    // const dnsRecord = await new DamgaApi(`${services.damga}/${services.base}`, headers)
    //   .getDnsRecord(this.item.domain).catch(e => {
    //     console.log('Getting dns record failed', e);
    //   });
    // if (!dnsRecord) return;
    // this.dnsRecord = dnsRecord;
  }
  render() {
    var _a, _b;
    return (h(Host, null, damgaProxyIPs[(_a = this.dnsRecord) === null || _a === void 0 ? void 0 : _a.record] || ((_b = this.dnsRecord) === null || _b === void 0 ? void 0 : _b.record) || '-'));
  }
};
DamgaDnsRecord.style = damgaDnsRecordCss;

export { DamgaDnsRecord as damga_dns_record };
