import { jsxs as n, jsx as d, Fragment as md } from "react/jsx-runtime";
import { forwardRef as ud, useState as vd, useCallback as Nd } from "react";
import { cx as f } from "../../utils/classNames.js";
import { useArrowTheme as xd } from "../../hooks/useArrowTheme.js";
import { Divider as l } from "../divider/Divider.js";
function r(s, e = !1) {
  return s.map(
    (i, h) => Object.entries(i).map(([t, a], o) => /* @__PURE__ */ n("li", { role: "listitem", children: [
      /* @__PURE__ */ d("span", { children: t }),
      /* @__PURE__ */ d("span", { children: e ? `$${a}` : String(a ?? "") })
    ] }, `${h}-${o}`))
  );
}
const $d = ud(
  ({
    id: s = "broadband-facts",
    heading: e,
    subheading: i,
    accordionEyebrow: h,
    accordionHeading: t,
    expanded: a = !1,
    focused: o = !1,
    onToggle: c,
    monthlyPriceHeading: O,
    monthlyPrice: m,
    priceDetails: b,
    linesSummary: u,
    moreLinesHeading: v,
    moreLines: N,
    introParagraph1: x,
    introParagraph2: $,
    additionalChargesAndTermsHeading: R,
    monthlyFeesSubheading: z,
    monthlyFeesValue: G = 0,
    monthlyFeesItems: p,
    oneTimeFeesSubheading: J,
    oneTimeFeesValue: K = 0,
    oneTimeFeesItems: _,
    earlyTerminationChargesLabel: M,
    earlyTerminationChargesValue: Q = 0,
    taxLabel: W,
    taxValue: X,
    discountsHeading: Y,
    discountsParagraph: Z,
    acpHeading: D,
    acpParagraph: F,
    acpLineLabel: H,
    acpLineValue: U,
    speedsHeading: V,
    downloadSpeedLabel: q,
    downloadSpeedValue: L,
    uploadSpeedLabel: g,
    uploadSpeedValue: y,
    latencyLabel: T,
    latencyValue: I,
    dataIncludedLabel: P,
    dataIncludedValue: j,
    dataUsageChargeItems: k,
    networkPolicyLinkText: dd,
    networkPolicyLinkHref: nd,
    privacyPolicyLinkText: ld,
    privacyPolicyLinkHref: ad,
    customerSupportHeading: rd,
    contactLinkText: sd,
    contactLinkHref: cd,
    supportParagraph1: S,
    supportParagraph2: w,
    footerParagraph: B,
    uniquePlanIdentifierLabel: C,
    uniquePlanIdentifier: E,
    inverse: ed,
    className: id
  }, hd) => {
    const td = xd(), od = ed ?? td.inverse, [bd, pd] = vd(a), A = c !== void 0 ? a : bd, _d = Nd(() => {
      c ? c() : pd((fd) => !fd);
    }, [c]);
    return /* @__PURE__ */ n(
      "div",
      {
        ref: hd,
        className: f("tdds-broadband-facts", id),
        ...od ? { "data-inverse": "true" } : {},
        children: [
          /* @__PURE__ */ n("h2", { className: "tdds-broadband-facts__headline", children: [
            e,
            /* @__PURE__ */ d("span", { children: i })
          ] }),
          /* @__PURE__ */ d("div", { className: "tdds-broadband-facts__divider", children: /* @__PURE__ */ d(l, {}) }),
          /* @__PURE__ */ d("h3", { children: /* @__PURE__ */ d(
            "button",
            {
              className: f("tdds-broadband-facts__accordion", {
                "force-focus": o
              }),
              "aria-expanded": A,
              "aria-controls": s,
              onClick: _d,
              children: /* @__PURE__ */ n("span", { className: "tdds-broadband-facts__accordion--text", children: [
                /* @__PURE__ */ d("span", { children: h }),
                t
              ] })
            }
          ) }),
          /* @__PURE__ */ n(
            "div",
            {
              id: s,
              className: f("tdds-broadband-facts__details", {
                "tdds-broadband-facts__details--hide": !A
              }),
              children: [
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ n("h4", { className: "tdds-broadband-facts__h4", children: [
                  /* @__PURE__ */ d("span", { children: O }),
                  !b && m !== void 0 ? /* @__PURE__ */ n("span", { children: [
                    "$",
                    m
                  ] }) : null
                ] }),
                b ? /* @__PURE__ */ d("ul", { role: "list", children: r(b, !0) }) : u ? /* @__PURE__ */ d("p", { children: u }) : null,
                N ? /* @__PURE__ */ n(md, { children: [
                  v ? /* @__PURE__ */ d("h5", { children: v }) : null,
                  /* @__PURE__ */ d("ul", { role: "list", children: r(N) })
                ] }) : null,
                /* @__PURE__ */ d(l, { variant: "strong" }),
                x ? /* @__PURE__ */ d("p", { children: x }) : null,
                $ ? /* @__PURE__ */ d("p", { children: $ }) : null,
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ d("h4", { className: "tdds-broadband-facts__h4", children: R }),
                /* @__PURE__ */ n("h5", { className: "tdds-broadband-facts__h5", children: [
                  /* @__PURE__ */ d("span", { children: z }),
                  p ? null : /* @__PURE__ */ n("span", { children: [
                    "$",
                    G
                  ] })
                ] }),
                p ? /* @__PURE__ */ d("ul", { role: "list", children: r(p) }) : null,
                /* @__PURE__ */ n("h5", { className: "tdds-broadband-facts__h5", children: [
                  /* @__PURE__ */ d("span", { children: J }),
                  _ ? null : /* @__PURE__ */ n("span", { children: [
                    "$",
                    K
                  ] })
                ] }),
                _ ? /* @__PURE__ */ d("ul", { role: "list", children: r(_) }) : null,
                /* @__PURE__ */ n("h5", { className: "tdds-broadband-facts__h5", children: [
                  /* @__PURE__ */ d("span", { children: M }),
                  /* @__PURE__ */ n("span", { children: [
                    "$",
                    Q
                  ] })
                ] }),
                /* @__PURE__ */ n("h5", { className: "tdds-broadband-facts__h5", children: [
                  /* @__PURE__ */ d("span", { children: W }),
                  /* @__PURE__ */ d("span", { children: X })
                ] }),
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ d("h4", { className: "tdds-broadband-facts__h4", children: Y }),
                /* @__PURE__ */ d("p", { children: Z }),
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ d("h4", { className: "tdds-broadband-facts__h4", children: D }),
                /* @__PURE__ */ d("p", { children: F }),
                /* @__PURE__ */ n("p", { children: [
                  /* @__PURE__ */ d("span", { children: H }),
                  /* @__PURE__ */ d("span", { children: U })
                ] }),
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ d("h4", { className: "tdds-broadband-facts__h4", children: V }),
                /* @__PURE__ */ n("ul", { role: "list", children: [
                  /* @__PURE__ */ n("li", { role: "listitem", children: [
                    /* @__PURE__ */ d("span", { children: q }),
                    /* @__PURE__ */ d("span", { children: L })
                  ] }),
                  /* @__PURE__ */ n("li", { role: "listitem", children: [
                    /* @__PURE__ */ d("span", { children: g }),
                    /* @__PURE__ */ d("span", { children: y })
                  ] }),
                  /* @__PURE__ */ n("li", { role: "listitem", children: [
                    /* @__PURE__ */ d("span", { children: T }),
                    /* @__PURE__ */ d("span", { children: I })
                  ] })
                ] }),
                /* @__PURE__ */ d(l, {}),
                /* @__PURE__ */ n("h5", { className: "tdds-broadband-facts__h5", children: [
                  /* @__PURE__ */ d("span", { children: P }),
                  j ? /* @__PURE__ */ d("span", { children: j }) : null
                ] }),
                k ? /* @__PURE__ */ d("ul", { role: "list", children: r(k, !0) }) : null,
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ d("a", { href: nd, children: dd }),
                /* @__PURE__ */ d("a", { href: ad, children: ld }),
                /* @__PURE__ */ d(l, { variant: "strong" }),
                /* @__PURE__ */ d("h4", { className: "tdds-broadband-facts__h4", children: rd }),
                /* @__PURE__ */ d("a", { href: cd, children: sd }),
                S ? /* @__PURE__ */ d("p", { children: S }) : null,
                w ? /* @__PURE__ */ d("p", { children: w }) : null,
                /* @__PURE__ */ d(l, { variant: "strong" }),
                B ? /* @__PURE__ */ d("p", { children: B }) : null,
                C || E ? /* @__PURE__ */ n("p", { children: [
                  C,
                  " ",
                  E
                ] }) : null
              ]
            }
          )
        ]
      }
    );
  }
);
$d.displayName = "BroadbandFacts";
export {
  $d as BroadbandFacts
};
//# sourceMappingURL=BroadbandFacts.js.map
