import { normalize } from "./lib-normalize.js";
import { DefinedInfo } from "./lib-util-defined-info.js";
import { Schema } from "./lib-util-schema.js";
function create(definition) {
  const properties = {};
  const normals = {};
  for (const [property, value] of Object.entries(definition.properties)) {
    const info = new 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(property)] = property;
    normals[normalize(info.attribute)] = property;
  }
  return new Schema(properties, normals, definition.space);
}
export {
  create
};
//# sourceMappingURL=lib-util-create.js.map
