"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const normalize = require("./lib-normalize.cjs");
const definedInfo = require("./lib-util-defined-info.cjs");
const schema = require("./lib-util-schema.cjs");
function create(definition) {
  const properties = {};
  const normals = {};
  for (const [property, value] of Object.entries(definition.properties)) {
    const info = new definedInfo.DefinedInfo(
      property,
      definition.transform(definition.attributes || {}, property),
      value,
      definition.space
    );
    if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) {
      info.mustUseProperty = true;
    }
    properties[property] = info;
    normals[normalize.normalize(property)] = property;
    normals[normalize.normalize(info.attribute)] = property;
  }
  return new schema.Schema(properties, normals, definition.space);
}
exports.create = create;
//# sourceMappingURL=lib-util-create.cjs.map
