import { importShared } from './__federation_fn_import-B0FfK6vm.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,createPluginModule} = await importShared('@baseplate-dev/project-builder-lib');
const common = createPluginModule({
  name: "common",
  dependencies: {
    adminCrudInput: adminCrudInputSpec
  },
  initialize: ({ adminCrudInput }) => {
    adminCrudInput.inputs.add({
      name: "file",
      createSchema: createAdminCrudFileInputSchema
    });
  }
});

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