import { jsxs as t, Fragment as g, jsx as e } from "react/jsx-runtime";
import { forwardRef as F, useId as R } from "react";
import { cx as u } from "../../utils/classNames.js";
import { useArrowTheme as S } from "../../hooks/useArrowTheme.js";
import { Divider as v } from "../divider/Divider.js";
import { StatusLabel as $ } from "../status-label/StatusLabel.js";
const k = F(
  ({
    label: n,
    labelId: f,
    body: l,
    status: r,
    leadingDecorationType: i,
    leadingImage: m,
    leadingIcon: o,
    leadingDecorationA11yLabel: h,
    dividerPosition: a = "bottom",
    inverse: p,
    focused: N,
    navigationUrl: _,
    className: I
  }, L) => {
    const b = S(), s = p ?? b.inverse, x = R(), d = f || x;
    if (!n)
      return null;
    const j = /* @__PURE__ */ t(g, { children: [
      /* @__PURE__ */ e("div", { className: "tdds-list-item__label", children: n }),
      l == null ? void 0 : l.map(
        ({ text: c, icon: A, iconA11yLabel: q }, C) => c ? /* @__PURE__ */ t("div", { className: "tdds-list-item__optional-copy", children: [
          A ?? null,
          c
        ] }, C) : null
      )
    ] }), w = /* @__PURE__ */ t("div", { className: "tdds-list-item__content", children: [
      i ? /* @__PURE__ */ t(
        "div",
        {
          className: "tdds-list-item__leading-decoration",
          "data-image-type": i,
          id: `${d}-leading-decoration`,
          children: [
            i === "icon" && o ? o : null,
            i !== "icon" && m ? /* @__PURE__ */ e("img", { src: m, alt: h || "" }) : null
          ]
        }
      ) : null,
      /* @__PURE__ */ t("div", { className: "tdds-list-item__main-content", id: d, children: [
        j,
        r ? /* @__PURE__ */ e($, { ...r, inverse: s }) : null
      ] })
    ] });
    return /* @__PURE__ */ e(
      "li",
      {
        ref: L,
        className: u("tdds-list-item", I),
        "data-inverse": s ? "true" : void 0,
        role: "listitem",
        children: /* @__PURE__ */ t(
          "a",
          {
            href: _,
            className: u({ "force-focus": !!N }),
            children: [
              a === "top" ? /* @__PURE__ */ e(v, { inverse: s }) : null,
              w,
              a === "bottom" ? /* @__PURE__ */ e(v, { inverse: s }) : null
            ]
          }
        )
      }
    );
  }
);
k.displayName = "ListItemNavigation";
export {
  k as ListItemNavigation
};
//# sourceMappingURL=ListItemNavigation.js.map
