import { o as objectType, s as stringType } from "../../index-D5q7WHKa.js";
const createCommonDataSourceSchema = (configSchema) => objectType({
  name: stringType().trim().min(1),
  prefix: stringType().trim().min(1).regex(
    /^$|^[A-Z][A-Za-z0-9_]*$/,
    "Must start with an uppercase letter and only consist of alphanumeric characters and underscores"
  ),
  config: configSchema
});
const createCommonDataSourceFieldsMeta = (configFieldsMeta) => ({
  name: {
    label: "Data Source Name",
    name: "name"
  },
  prefix: {
    label: "Data Source Prefix",
    helpText: "The prefix to use for types synced from this data source. It must start with an uppercase letter and can only consist of alphanumeric characters and underscores. For example, Product becomes {Prefix}Product."
  },
  config: configFieldsMeta
});
export {
  createCommonDataSourceFieldsMeta,
  createCommonDataSourceSchema
};
//# sourceMappingURL=common.js.map
