import{S as E}from"./SourceCode.5641f3f6.js";import{_ as T}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.ed35f1dd.js";import{C as V}from"./ContentLayout.24733df3.js";import{F as M,I as q,_ as H}from"./FilesNavigator.e61fbf00.js";import{S as J}from"./SaveButton.f443a4e0.js";import{i as L}from"./files.b924b280.js";import{G as O,I as z}from"./PhFilePy.vue.8f28a56a.js";import{G as Q}from"./PhFolder.vue.552fd64c.js";import{H as W,F as K}from"./PhPackage.vue.5e2ae73b.js";import{d as U,e3 as X,c as s,w as n,u as t,o,a as h,b as m,az as Y,d6 as Z,F as f,da as ee,eE as te,cy as se,Q as oe}from"./index.6b1213c6.js";import{F as re,G as ae,a as ne,I as ie}from"./PhWebhooksLogo.vue.496527e8.js";import{u as pe,C as de}from"./useCodebase.f402bfd7.js";import"./linters.caf56568.js";import"./workspaces.1557b2ee.js";import"./runnerData.f49521d9.js";import"./url.16d95866.js";import"./colorHelpers.59418473.js";import"./record.9f32285a.js";import"./omniChatStore.3474fda6.js";import"./asyncComputed.fe6ca61b.js";import"./polling.32ed3bad.js";import"./validations.fc2b95fa.js";import"./string.8a712bbd.js";import"./toggleHighContrast.5807794c.js";import"./index.525c9059.js";import"./Card.e2c03a6d.js";import"./TabPane.49a7fa43.js";import"./Logo.be00950c.js";import"./popupNotifcation.97dc9547.js";import"./ant-design.d006a6d7.js";import"./UnsavedChangesHandler.2bc8785e.js";import"./ExclamationCircleOutlined.e92280ca.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="88717b07-ed7d-443e-9a34-cf85d65587c9",a._sentryDebugIdIdentifier="sentry-dbid-88717b07-ed7d-443e-9a34-cf85d65587c9")}catch{}})();const ce={style:{height:"100%",display:"flex","flex-direction":"column","justify-content":"stretch","align-items":"stretch"}},me={style:{display:"flex","justify-content":"space-between","align-items":"center"}},le=U({__name:"Codebase",setup(a){const i=X(),l=e=>e.type==="file"&&e.pathParts[e.pathParts.length-1].endsWith(".py"),g=e=>e.type==="file"&&e.pathParts.length===1&&e.pathParts[0]==="abstra.json",k=e=>e.type==="file"&&L(e.pathParts[e.pathParts.length-1]),b=e=>e.type==="file"&&e.pathParts.length===1&&e.pathParts[0]==="requirements.txt",C=e=>e.type==="file"&&e.pathParts.length===1&&e.pathParts[0]===".env",x=e=>e.type==="file"&&e.pathParts.length===1&&e.pathParts[0]===".gitignore",p=(e,_)=>N.value.some(r=>r.stages.some(B=>B.type===e)&&r.file.pathParts.join("/")===_.pathParts.join("/")),I=e=>p("form",e),w=e=>p("hook",e),P=e=>p("job",e),F=e=>p("script",e),v=new de,{loading:u,uploadFile:$,deleteFile:j,open:G,files:D,editing:d,renameFile:A,sourceCodeEditable:c,mkdir:S,workspaceModel:y,filesListResponse:N,settings:R}=pe({api:v,router:i});return(e,_)=>(o(),s(V,{"full-width":!!t(d)},{default:n(()=>[h("div",ce,[h("div",me,[m(t(Z),null,{default:n(()=>[Y("Source Code")]),_:1}),t(c)?(o(),s(J,{key:0,model:t(c),disabled:t(u)},null,8,["model","disabled"])):f("",!0)]),m(H,{"inner-class":"scroll-area","outer-style":{flexGrow:1},"inner-style":{display:"flex",justifyContent:"stretch",gap:"20px"}},{default:n(()=>[m(M,{class:"files-nav",files:t(D),loading:t(u),separator:t(R).separator,onCreate:t($),onDelete:t(j),onOpen:t(G),onRename:t(A),onMkdir:t(S)},{icon:n(({file:r})=>[m(t(ee),{style:{height:"100%"},justify:"center",align:"center"},{default:n(()=>[r.type==="directory"?(o(),s(t(Q),{key:0})):I(r)?(o(),s(t(re),{key:1})):w(r)?(o(),s(t(ae),{key:2})):P(r)?(o(),s(t(ne),{key:3})):F(r)?(o(),s(t(ie),{key:4})):l(r)?(o(),s(t(O),{key:5})):g(r)?(o(),s(T,{key:6,"hide-text":""})):b(r)?(o(),s(t(W),{key:7})):C(r)?(o(),s(t(z),{key:8})):k(r)?(o(),s(t(te),{key:9})):x(r)?(o(),s(t(K),{key:10})):(o(),s(t(q),{key:11}))]),_:2},1024)]),_:1},8,["files","loading","separator","onCreate","onDelete","onOpen","onRename","onMkdir"]),t(d)&&t(d).isImage()?(o(),s(t(se),{key:0,class:"editing-content",src:t(d).url},null,8,["src"])):t(c)&&t(y)?(o(),s(E,{key:1,script:t(c),class:"editing-content","hide-header":"",workspace:t(y)},null,8,["script","workspace"])):f("",!0)]),_:1})])]),_:1},8,["full-width"]))}});const Oe=oe(le,[["__scopeId","data-v-8c65d618"]]);export{Oe as default};
//# sourceMappingURL=Codebase.2982d68d.js.map
