import { useState } from "react";
import { ManagedSchema } from "../ManagedSchema.js";
export function useSchema(jsonSchema) {
    const [schema, setSchema] = useState(new ManagedSchema(jsonSchema || { type: "object", properties: {} }).withChangeListener((schema) => {
        setSchema(schema.clone());
    }));
    return schema;
}
//# sourceMappingURL=SchemaContext.js.map