import { Schema } from "./schema.js";
import { normalize } from "../normalize.js";
import { DefinedInfo } from "./defined-info.js";
function create(r) {
	let i = {}, a = {};
	for (let [e, o] of Object.entries(r.properties)) {
		let s = new DefinedInfo(e, r.transform(r.attributes || {}, e), o, r.space);
		r.mustUseProperty && r.mustUseProperty.includes(e) && (s.mustUseProperty = !0), i[e] = s, a[normalize(e)] = e, a[normalize(s.attribute)] = e;
	}
	return new Schema(i, a, r.space);
}
export { create };
