import{d as f,ey as y,H as b,b as D,c as w,u as g}from"./outputWidgets.397b3720.js";import{e as _,a as C,b as k}from"./icons.5e65f599.js";import{a as v}from"./asyncComputed.28fc9d36.js";import{D as l}from"./dashes.ba5de5ab.js";import{C as x}from"./CrudView.77c1d16d.js";import{a as I}from"./ant-design.29edbf4a.js";import"./activeRecord.6bb6b853.js";import"./pubsub.fe0f0397.js";import"./runnerData.e0501241.js";import"./index.19008df2.js";import"./Title.382247fb.js";import"./Form.5ce50c8f.js";import"./router.3bc1b205.js";import"./index.06276212.js";import"./url.53bc193a.js";import"./index.4acaedbb.js";import"./index.c9ea7155.js";import"./index.40ca2e79.js";import"./index.e12747aa.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="87319981-c763-40ea-8031-0f7fdd5ce09f",o._sentryDebugIdIdentifier="sentry-dbid-87319981-c763-40ea-8031-0f7fdd5ce09f")}catch{}})();const G=f({__name:"Dashes",setup(o){const s=y(),{loading:r,result:n,refetch:d}=v(()=>l.list()),c=({key:e})=>s.push({name:"dashEditor",params:{dashPath:e}}),p=async({key:e})=>{var a,t;await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.duplicate()),d()},m=async()=>{const e=await l.create();c({key:e.path})},u=async({key:e})=>{var a,t;await I("Are you sure you want to delete this dash?")&&(await((t=(a=n.value)==null?void 0:a.find(i=>i.path===e))==null?void 0:t.delete()),d())},h=b(()=>{var e,a;return{columns:[{name:"Dash Name"},{name:"Path"},{name:"Actions",align:"right"}],rows:(a=(e=n.value)==null?void 0:e.map(t=>({key:t.path,cells:[{text:t.title,link:`/_editor/dash/${encodeURIComponent(t.path)}`},{text:t.path},{text:"",actions:[{icon:_,label:"Edit Dash",onClick:c},{icon:C,label:"Duplicate",onClick:p},{icon:k,label:"Delete",onClick:u,dangerous:!0}]}]})))!=null?a:[]}});return(e,a)=>(D(),w(x,{loading:g(r),title:"Python Dashes",description:"Create a dashboard page with charts and inputs interacting with your python code.","create-button-text":"Create Dash","empty-title":"No dashes here yet","video-url":"https://www.youtube.com/embed/oYMptrk7QNE",table:h.value,"entity-name":"Dash",onCreate:m},null,8,["loading","table"]))}});export{G as default};
//# sourceMappingURL=Dashes.047ffdc3.js.map
