import{jsx as u}from"react/jsx-runtime";import{memo as S}from"react";import{useLocation as y}from"react-router-dom";import{useAtomValue as b}from"jotai/index";import{pathIncludesLink as h}from"../../utils/index.js";import{operationStore as A}from"../../jotai/operation.js";import{extractTypeFromDeepLink as T}from"./helpers.js";import{ViewNested as $}from"../ViewNested/index.js";import{useTranslate as w}from"../../hooks/index.js";function N({expandByDefault:t,deepLink:e,level:r,expandable:a=!1,isNestedArray:n=!1,isArray:m="",propertyLength:o="",children:p,operationPointer:s}){const i=w(),c=y(),l=h(c,e),f=T(e),x=b(A(s||"")),d=`${i("openapi.actions.show","Show")} ${Number(o)===1?"":o} ${m&&"array "}${o!==1?"properties":"property"}`;return u($,{expandByDefault:t||l,level:r,isNestedArray:n,expandable:a,expandText:d,children:p,expandedAll:x[f]?.expandedAll})}const L=S(N);export{L as SubSchema};
