import { jsxDEV } from "react/jsx-dev-runtime";
import { Entity } from "@contember/binding";
import { Grid } from "@contember/ui";
import { useClassName } from "@contember/utilities";
import { memo } from "react";
import { dataGridDictionary } from "../dataGridDictionary.js";
import { useMessageFormatter } from "../../../../../../i18n/useMessageFormatter.js";
import { EmptyMessage } from "../../../helpers/EmptyMessage.js";
const DataGridContainerGrid = memo(({
  accessor,
  emptyMessage,
  emptyMessageComponent,
  tile,
  tileSize = 160
}) => {
  const formatMessage = useMessageFormatter(dataGridDictionary);
  return /* @__PURE__ */ jsxDEV("div", { className: useClassName("data-grid-body-content-grid"), children: /* @__PURE__ */ jsxDEV(Grid, { columnWidth: tileSize, children: !!accessor.length ? Array.from(accessor, (entity) => /* @__PURE__ */ jsxDEV(Entity, { accessor: entity, children: tile }, entity.id, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/DataGrid/base/DataGridContainer/DataGridContainerGrid.tsx",
    lineNumber: 33,
    columnNumber: 7
  }, globalThis)) : /* @__PURE__ */ jsxDEV(EmptyMessage, { component: emptyMessageComponent, className: "cui-grid-row-full-width", children: formatMessage(emptyMessage, "dataGrid.emptyMessage.text") }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/DataGrid/base/DataGridContainer/DataGridContainerGrid.tsx",
    lineNumber: 38,
    columnNumber: 7
  }, globalThis) }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/DataGrid/base/DataGridContainer/DataGridContainerGrid.tsx",
    lineNumber: 30,
    columnNumber: 4
  }, globalThis) }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/collections/DataGrid/base/DataGridContainer/DataGridContainerGrid.tsx",
    lineNumber: 29,
    columnNumber: 3
  }, globalThis);
});
DataGridContainerGrid.displayName = "DataGridContainerGrid";
export {
  DataGridContainerGrid
};
//# sourceMappingURL=DataGridContainerGrid.js.map
