/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import { c as l } from "../../chunks/runtime.js";
import { css as c, html as o } from "lit";
import { LitElement as d } from "@arcgis/lumina";
import { u } from "../../chunks/useT9n.js";
import { log as s, composeMissingPropertyMessage as n } from "@arcgis/toolkit/log";
const m = c`.subnetwork-details{border-radius:var(--calcite-border-radius);border:solid 1px var(--calcite-color-border-3)}.key-value-pair{padding:var(--calcite-spacing-sm)}.key-value-pair__key{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3)}.key-value-pair__value{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}`;
class g extends d {
  constructor() {
    super(...arguments), this._messages = u({ blocking: !0 });
  }
  static {
    this.properties = { namedTraceConfig: 0 };
  }
  static {
    this.styles = m;
  }
  loaded() {
    this.namedTraceConfig || s("warn", this, n("namedTraceConfig"));
  }
  render() {
    const { _messages: e, namedTraceConfig: r } = this;
    if (!r?.traceConfiguration)
      return s("error", this, n("namedTraceConfig.traceConfiguration")), null;
    const { domainNetworkName: a, tierName: i, targetTierName: t } = r.traceConfiguration;
    return !a && !i && !t ? (s("warn", this, "`namedTraceConfig.traceConfiguration` has no `domainNetworkName`, `tierName`, or `targetTierName`."), null) : o`<div class="subnetwork-details">${a ? this._renderKeyValuePair(e.headings.domainNetwork, a) : null}${i ? this._renderKeyValuePair(e.headings.tier, i) : null}${t ? this._renderKeyValuePair(e.headings.targetTier, t) : null}</div>`;
  }
  _renderKeyValuePair(e, r) {
    return o`<div class="key-value-pair"><div class="key-value-pair__key">${e}</div><div class="key-value-pair__value">${r}</div></div>`;
  }
}
l("arcgis-utility-network-subnetwork-info", g);
export {
  g as ArcgisUtilityNetworkSubnetworkInfo
};
