import{S as T}from"./SourceCode.9e25ca8e.js";import{_ as V}from"./AbstraLogo.vue_vue_type_script_setup_true_lang.bf726c97.js";import{C as E}from"./ContentLayout.4f819aa5.js";import{F as M,I as q,_ as H}from"./FilesNavigator.91d0433e.js";import{S as J}from"./SaveButton.fb6860cb.js";import{i as L}from"./files.7d0ee655.js";import{G as O,I as z}from"./PhFilePy.vue.3416af62.js";import{G as Q}from"./PhFolder.vue.0fd5da48.js";import{H as W,F as K}from"./PhPackage.vue.422e24aa.js";import{d as U,e3 as X,c as s,w as n,u as t,o,a as _,b as m,az as Y,d6 as Z,F as h,da as ee,eG as te,cy as se,Q as oe}from"./index.2bd55860.js";import{F as ae,G as re,a as ne,I as ie}from"./PhWebhooksLogo.vue.6d342c2b.js";import{u as pe,C as de}from"./useCodebase.419fd11d.js";import"./linters.5ae2dbb2.js";import"./workspaces.2344942c.js";import"./runnerData.578dbe7d.js";import"./url.8ddd701d.js";import"./colorHelpers.4e11e3ec.js";import"./record.5f72dfbb.js";import"./omniChatStore.5537d810.js";import"./asyncComputed.8007720a.js";import"./polling.2addda62.js";import"./validations.edfacc3b.js";import"./string.fcee8e82.js";import"./toggleHighContrast.2d880ba5.js";import"./index.fc1b0da7.js";import"./Card.687477e5.js";import"./TabPane.cb697785.js";import"./Logo.3a35c761.js";import"./popupNotifcation.44e16211.js";import"./ant-design.52becce9.js";import"./UnsavedChangesHandler.e7cb4ed5.js";import"./ExclamationCircleOutlined.99265c18.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[i]="15ff4eba-fe5a-44c5-a52f-5d2f1a48d126",r._sentryDebugIdIdentifier="sentry-dbid-15ff4eba-fe5a-44c5-a52f-5d2f1a48d126")}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(r){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,f)=>N.value.some(a=>a.stages.some(B=>B.type===e)&&a.file.pathParts.join("/")===f.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:G,deleteFile:$,open:j,files:D,editing:d,renameFile:A,sourceCodeEditable:c,mkdir:S,workspaceModel:y,filesListResponse:N,settings:R}=pe({api:v,router:i});return(e,f)=>(o(),s(E,{"full-width":!!t(d)},{default:n(()=>[_("div",ce,[_("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"])):h("",!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(G),onDelete:t($),onOpen:t(j),onRename:t(A),onMkdir:t(S)},{icon:n(({file:a})=>[m(t(ee),{style:{height:"100%"},justify:"center",align:"center"},{default:n(()=>[a.type==="directory"?(o(),s(t(Q),{key:0})):I(a)?(o(),s(t(ae),{key:1})):w(a)?(o(),s(t(re),{key:2})):P(a)?(o(),s(t(ne),{key:3})):F(a)?(o(),s(t(ie),{key:4})):l(a)?(o(),s(t(O),{key:5})):g(a)?(o(),s(V,{key:6,"hide-text":""})):b(a)?(o(),s(t(W),{key:7})):C(a)?(o(),s(t(z),{key:8})):k(a)?(o(),s(t(te),{key:9})):x(a)?(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(T,{key:1,script:t(c),class:"editing-content","hide-header":"",workspace:t(y)},null,8,["script","workspace"])):h("",!0)]),_:1})])]),_:1},8,["full-width"]))}});const Oe=oe(le,[["__scopeId","data-v-8c65d618"]]);export{Oe as default};
//# sourceMappingURL=Codebase.18a46cda.js.map
