(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8033],{37131:function(e,l,s){Promise.resolve().then(s.bind(s,19597))},19597:function(e,l,s){"use strict";s.r(l),s.d(l,{default:function(){return x}});var r=s(29362),t=s(27013),n=s(69755),i=s(57960),c=s(40929),o=s(42536),a=s(64971),u=s(24993),f=s(49267),d=s(48788);function x(){let e=(0,c.useRef)(null),l=(0,i.Z)(e),{data:s,isLoading:x,mutate:h}=(0,o.ZP)("/api/list",()=>(0,f.mE)({type:"workflow"})),m=()=>{h()};return(0,r.jsxs)("div",{className:"h-full flex flex-col",children:[(0,r.jsxs)("div",{className:(0,d.cn)("h-16 flex justify-between items-center px-6 border-b",(null==l?void 0:l.top)&&(null==l?void 0:l.top)>0?"border-default":"border-transparent"),children:[(0,r.jsx)(t.X6,{size:"h2",children:"Workflow"}),(0,r.jsx)("div",{className:"flex items-center gap-x-2",children:(0,r.jsx)(a.K,{onSuccess:m,type:"workflow"})})]}),(0,r.jsxs)("main",{className:"w-full h-full overflow-auto",ref:e,children:[x&&(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,r.jsx)(n.$,{className:"text-brand"})}),!x&&(null==s?void 0:s.data.length)?(0,r.jsx)("div",{className:"px-6 py-4 grid lg:grid-cols-3 large:grid-cols-4 2xl:grid-cols-5 gap-4 mb-6",children:null==s?void 0:s.data.map(e=>(0,r.jsx)(u.t,{type:"workflow",...e,onSuccess:m},e.id))}):null,!x&&!(null==s?void 0:s.data.length)&&(0,r.jsxs)("div",{className:"grow w-full h-full flex flex-col justify-center items-center",children:[(0,r.jsx)(t.X6,{size:"h2",children:"Create your first workflow"}),(0,r.jsx)(t.xv,{size:"sm",color:"subtle",className:"mt-1.5 mb-6",children:"Click button to create a workflow"}),(0,r.jsx)(a.K,{size:"lg",onSuccess:m,type:"workflow"})]})]})]})}s(71473)}},function(e){e.O(0,[8164,2798,2578,8708,7407,9006,2536,8707,1421,342,7992,6406,1744],function(){return e(e.s=37131)}),_N_E=e.O()}]);