import e, { cloneElement as d } from "react";
import { IconSize as r } from "../../foundation/Icon/IconSize.es.es.js";
import { merge as m } from "../../utilities/merge.es.es.js";
import { MenuItemContentSize as t } from "./types.es.es.js";
const o = {
  [t.XSmall]: "tw-pr-1.5",
  [t.Small]: "tw-pr-1.5",
  [t.Large]: "tw-pr-2"
}, h = ({
  title: s,
  decorator: n,
  switchComponent: l,
  subtitle: i,
  ariaProps: w,
  size: a = t.Small,
  children: c
}) => /* @__PURE__ */ e.createElement("div", {
  ...w,
  "data-test-id": "menu-item-content",
  className: "tw-flex tw-box-border tw-items-center tw-font-sans tw-text-s tw-flex-auto tw-min-w-0"
}, n && /* @__PURE__ */ e.createElement("span", {
  className: m(["tw-shrink-0", o[a]]),
  "data-test-id": "menu-item-decorator"
}, d(n, {
  size: a === t.Large ? r.Size24 : r.Size16
})), /* @__PURE__ */ e.createElement("div", {
  className: "tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap"
}, /* @__PURE__ */ e.createElement("div", {
  "data-test-id": "menu-item-title",
  className: "tw-select-none tw-text-ellipsis tw-overflow-hidden",
  title: typeof s == "string" ? s : ""
}, c || s), i && a === t.Large && /* @__PURE__ */ e.createElement("div", {
  "data-test-id": "menu-item-subtitle",
  className: "tw-select-none tw-text-xxs",
  title: i
}, i)), l && /* @__PURE__ */ e.createElement("span", {
  className: m(["tw-shrink-0", o[a]]),
  "data-test-id": "menu-item-decorator"
}, l));
export {
  h as MenuItemContent
};
//# sourceMappingURL=MenuItemContent.es.es.js.map
