import{generateDeepLink}from"../common/LinkToField";export const getAllNestedSchema=({schema:e,activeOneOf:i,skipReadOnly:n=!1,skipWriteOnly:s=!1})=>{var t;if(!e||e.isCircular)return{};if(e.oneOf&&e.oneOf.length){const n=e.oneOf[i[e.pointer]||0];return(null==n?void 0:n.isCircular)?{}:getAllNestedSchema({schema:n,activeOneOf:i})}return(e.fields||(null===(t=e.items)||void 0===t?void 0:t.fields)||[]).reduce(((e,t)=>t.schema.isCircular||t.schema.isPrimitive||n&&t.schema.readOnly||s&&t.schema.writeOnly?e:Object.assign(Object.assign(Object.assign({},e),{[generateDeepLink(t)]:!1}),getAllNestedSchema({schema:t.schema,activeOneOf:i,skipReadOnly:n,skipWriteOnly:s}))),{})};
//# sourceMappingURL=getAllNestedSchema.js.map