import{j as s,aI as d}from"./vendor-ClLR6ncd.js";import{b as l,J as p,L as u}from"./index-OtVJl4GC.js";import{u as c,b as f}from"./model-C9Idzwgo.js";import{E as m}from"./Messages-BRmQDxrZ.js";import{B as x}from"./Box-Co2WcNPC.js";import"./lodash-ZyeDnt0e.js";function i({message:e}){return s.jsx(x,{sx:{width:1,display:"flex",justifyContent:"center"},children:s.jsx(m,{containerSx:{alignSelf:"center"},error:e})})}function C(){const{allRepositories:e}=c(),{catalogId:a,repositoryId:r,sessionId:t}=l(),o=p();return t&&o.data&&!o.data.isSessionOpened?s.jsx(i,{message:"Incorrect session id or session was closed"}):r&&Array.isArray(e)&&!e.find(({id:n})=>n===r)?s.jsx(i,{message:`Repository ${r} doesn't exist in ${f(a)} catalog`}):t&&o.isLoading||!Array.isArray(e)?s.jsx(u,{}):s.jsx(d,{})}export{C as default};
