import{d as f,ey as b,H as y,b as D,c as w,u as g}from"./outputWidgets.1739e6b5.js";import{e as _,a as C,b as k}from"./icons.1c3e2bde.js";import{a as v}from"./asyncComputed.b4d87a94.js";import{D as c}from"./dashes.3d94d969.js";import{C as x}from"./CrudView.245e4133.js";import{a as I}from"./ant-design.6ecbca2a.js";import"./activeRecord.55a23e4a.js";import"./pubsub.e4395938.js";import"./runnerData.f7d9251a.js";import"./Text.f4c0ef3e.js";import"./Title.1261c75a.js";import"./Form.6a4829ad.js";import"./router.95125983.js";import"./index.92715e30.js";import"./url.8bddfe76.js";import"./index.aaa812ca.js";import"./index.663f575e.js";import"./index.366cf7e1.js";import"./index.8b3d4030.js";import"./index.55ff2de5.js";import"./index.fbff59b3.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[i]="29c34339-2b27-4108-b25b-8207ff8d6e8f",o._sentryDebugIdIdentifier="sentry-dbid-29c34339-2b27-4108-b25b-8207ff8d6e8f")}catch{}})();const K=f({__name:"Dashes",setup(o){const i=b(),{loading:r,result:s,refetch:d}=v(()=>c.list()),p=({key:t})=>i.push({name:"dashEditor",params:{dashPath:t}}),l=async({key:t})=>{var a,e;await((e=(a=s.value)==null?void 0:a.find(n=>n.path===t))==null?void 0:e.duplicate()),d()},m=async()=>{const t=await c.create();p({key:t.path})},u=async({key:t})=>{var a,e;await I("Are you sure you want to delete this dash?")&&(await((e=(a=s.value)==null?void 0:a.find(n=>n.path===t))==null?void 0:e.delete()),d())},h=y(()=>{var t,a;return{columns:[{name:"Dash Name"},{name:"Path"},{name:"Actions",align:"right"}],rows:(a=(t=s.value)==null?void 0:t.map(e=>({key:e.path,cells:[{text:e.title,link:`/_editor/dash/${encodeURIComponent(e.path)}`},{text:e.path},{text:"",actions:[{icon:_,label:"Edit Dash",onClick:p},{icon:C,label:"Duplicate",onClick:l},{icon:k,label:"Delete",onClick:u,dangerous:!0}]}]})))!=null?a:[]}});return(t,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{K as default};
//# sourceMappingURL=Dashes.bf054a23.js.map
