import { z } from 'zod';

const schema = z.object({
  robots: z.union([z.string(), z.boolean()]).optional()
});
function asRobotsCollection(collection) {
  if (collection.type === "page") {
    collection.schema = collection.schema ? schema.extend(collection.schema.shape) : schema;
  }
  return collection;
}

export { asRobotsCollection, schema };
