"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SubSchema=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),react_router_dom_1=require("react-router-dom"),index_1=require("jotai/index"),utils_1=require("../../utils"),operation_1=require("../../jotai/operation"),helpers_1=require("./helpers"),ViewNested_1=require("../ViewNested"),hooks_1=require("../../hooks");function SubSchemaComponent({expandByDefault:e,deepLink:r,level:t,expandable:o=!1,isNestedArray:i=!1,isArray:a="",propertyLength:n="",children:s,operationPointer:u}){var p;const d=(0,hooks_1.useTranslate)(),l=(0,react_router_dom_1.useLocation)(),_=(0,utils_1.pathIncludesLink)(l,r),c=(0,helpers_1.extractTypeFromDeepLink)(r),x=(0,index_1.useAtomValue)((0,operation_1.operationStore)(u||"")),m=`${d("openapi.actions.show","Show")} ${1===Number(n)?"":n} ${a&&"array "}${1!==n?"properties":"property"}`;return(0,jsx_runtime_1.jsx)(ViewNested_1.ViewNested,{expandByDefault:e||_,level:t,isNestedArray:i,expandable:o,expandText:m,children:s,expandedAll:null===(p=x[c])||void 0===p?void 0:p.expandedAll})}exports.SubSchema=(0,react_1.memo)(SubSchemaComponent);
//# sourceMappingURL=SubSchema.js.map