"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const getGenericFileMetadataExtractor = ({ fileNameField, fileSizeField, fileTypeField, lastModifiedField }) => ({
  staticRender: () => /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children: [
    !!fileNameField && /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBinding.SugaredField, { field: fileNameField }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getGenericFileMetadataExtractor.tsx",
      lineNumber: 17,
      columnNumber: 24
    }, void 0),
    !!fileSizeField && /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBinding.SugaredField, { field: fileSizeField }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getGenericFileMetadataExtractor.tsx",
      lineNumber: 18,
      columnNumber: 24
    }, void 0),
    !!fileTypeField && /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBinding.SugaredField, { field: fileTypeField }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getGenericFileMetadataExtractor.tsx",
      lineNumber: 19,
      columnNumber: 24
    }, void 0),
    !!lastModifiedField && /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBinding.SugaredField, { field: lastModifiedField }, void 0, false, {
      fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getGenericFileMetadataExtractor.tsx",
      lineNumber: 20,
      columnNumber: 28
    }, void 0)
  ] }, void 0, true, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/upload/fileDataExtractors/getGenericFileMetadataExtractor.tsx",
    lineNumber: 16,
    columnNumber: 3
  }, void 0),
  populateFields: ({ entity, file }) => {
    entity.batchUpdates((getAccessor) => {
      fileNameField && getAccessor().getField(fileNameField).updateValue(file.name);
      fileSizeField && getAccessor().getField(fileSizeField).updateValue(file.size);
      fileTypeField && getAccessor().getField(fileTypeField).updateValue(file.type);
      lastModifiedField && getAccessor().getField(lastModifiedField).updateValue(file.lastModified);
    });
  }
});
exports.getGenericFileMetadataExtractor = getGenericFileMetadataExtractor;
//# sourceMappingURL=getGenericFileMetadataExtractor.cjs.map
