import { r as registerInstance, h } from './index-aeac5cad.js';
import './_commonjsHelpers-91fffb88.js';
import { c as Address } from './index-ec2a4942.js';
import { d as dist } from './index-31b724c4.js';

const styleCss = ".sc-payfunc-address-display-h{display:block;border-top:1px solid rgb(var(--smoothly-medium-color));border-bottom:1px solid rgb(var(--smoothly-medium-color))}";

const PayfuncAddressDisplay = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  render() {
    var _a, _b, _c;
    const value = typeof this.value == "string" ? JSON.parse(this.value) : this.value;
    return value.countryCode == "" ? (h("address", null, (_a = value.address1) !== null && _a !== void 0 ? _a : "", h("br", null), (_b = value.address2) !== null && _b !== void 0 ? _b : "", h("br", null), (_c = value.address3) !== null && _c !== void 0 ? _c : "")) : (h("address", null, value.street, h("br", null), value.zipCode, " ", value.city, h("br", null), Address.DE.is(value) || (Address.General.is(value) && value.state) ? value.state + " " : [], dist.CountryCode.Name.from("en", value.countryCode)));
  }
};
PayfuncAddressDisplay.style = styleCss;

export { PayfuncAddressDisplay as payfunc_address_display };
