import { jsxs as x, jsx as s } from "@emotion/react/jsx-runtime";
import { useEnvironment as C } from "@m4l/core";
import { pathIcons as i } from "../../../../icons.js";
import { Icon as G } from "@m4l/base";
import { DefaultRenderGroupCellRootStyled as R, DefaultRenderGroupCellTextStyled as S } from "../../../../slots/DataGridSlot.js";
import { useDataGrid as w } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
function $(a) {
  const { groupKey: r, isExpanded: o, toggleGroup: t, column: e, customRenderGroupCell: n, ...l } = a, { host_static_assets: p, environment_assets: c } = C(), { size: u, currentRowHeightVariant: m } = w(), d = o ? i.groupDown : i.groupUp, g = `${p}/${c}/${d}`, f = e.align, h = {
    groupKey: r,
    isExpanded: o,
    toggleGroup: t,
    column: e,
    ...l
  };
  return /* @__PURE__ */ x(R, { ownerState: { align: f }, onClick: t, children: [
    /* @__PURE__ */ s(
      G,
      {
        src: g,
        size: u,
        ariaLabel: o ? "Colapsar grupo" : "Expandir grupo"
      }
    ),
    n ? n(h) : /* @__PURE__ */ s(S, { ownerState: { currentRowHeightVariant: m }, children: String(r) })
  ] });
}
export {
  $ as RenderGroupCell
};
