import { importShared } from './__federation_fn_import-BY6M5C84.js';

const {baseAdminCrudInputSchema,definitionSchemaWithSlots,modelEntityType,modelTransformerEntityType} = await importShared('@baseplate-dev/project-builder-lib');

const {z} = await importShared('zod');

const createAdminCrudFileInputSchema = definitionSchemaWithSlots(
  { modelSlot: modelEntityType },
  (ctx, { modelSlot }) => baseAdminCrudInputSchema.extend({
    type: z.literal("file"),
    modelRelationRef: ctx.withRef({
      type: modelTransformerEntityType,
      onDelete: "RESTRICT",
      parentSlot: modelSlot
    })
  })
);

const {adminCrudInputSpec,createPlatformPluginExport} = await importShared('@baseplate-dev/project-builder-lib');
const common = createPlatformPluginExport({
  dependencies: {
    adminCrudInput: adminCrudInputSpec
  },
  exports: {},
  initialize: ({ adminCrudInput }) => {
    adminCrudInput.registerAdminCrudInput({
      name: "file",
      createSchema: createAdminCrudFileInputSchema
    });
    return {};
  }
});

export { common as default };
//# sourceMappingURL=__federation_expose_storageAdmin-crudCommon-DmI-mj6j.js.map
