(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8473],{52363:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var n=s(68527),i=s(11739),r=s(49609),a=s(15193),d=s(41664),l=s.n(d),c=s(18343),u=s(29112),h=s(79042),o=s(11163),x=s(2664),j=s(69970),f=s(53700),p=s(64330),_=s(41438),T=s(74015),k=s(85893),m=function(){var e=(0,x.useDispatch)(),t=(0,o.useRouter)(),s=(0,u.NR)().data,n=(0,f.hz)();(0,j.w)({resourceType:T.j.DATASETS,skip:!n.plus});var i=(0,x.useSelector)(_.dW),r=function(s){e((0,u.Zl)(s.fides_key)),t.push("/dataset/".concat(s.fides_key))};return s?(0,k.jsxs)(h.iA,{size:"sm","data-testid":"dataset-table",children:[(0,k.jsx)(h.hr,{children:(0,k.jsxs)(h.Tr,{children:[(0,k.jsx)(h.Th,{pl:1,children:"Name"}),(0,k.jsx)(h.Th,{pl:1,children:"Fides Key"}),(0,k.jsx)(h.Th,{pl:1,children:"Description"}),n.plus?(0,k.jsx)(h.Th,{"data-testid":"dataset-table__status-table-header",pl:1,children:"Status"}):null]})}),(0,k.jsx)(h.p3,{children:s.map((function(e){var t=i.get(e.fides_key);return(0,k.jsxs)(h.Tr,{_hover:{bg:"gray.50"},tabIndex:0,onClick:function(){return r(e)},onKeyPress:function(t){"Enter"===t.key&&r(e)},cursor:"pointer","data-testid":"dataset-row-".concat(e.fides_key),children:[(0,k.jsx)(h.Td,{pl:1,children:e.name}),(0,k.jsx)(h.Td,{pl:1,children:e.fides_key}),(0,k.jsx)(h.Td,{pl:1,children:e.description}),n.plus?(0,k.jsx)(h.Td,{pl:1,"data-testid":"dataset-status-".concat(e.fides_key),children:null!==t&&void 0!==t&&t.status?(0,k.jsx)(p.Z,{resource:T.j.DATASETS,status:null===t||void 0===t?void 0:t.status}):null}):null]},e.fides_key)}))})]}):(0,k.jsx)("div",{children:"Empty state"})},y=function(){var e=(0,u.NR)().isLoading;return(0,k.jsxs)(c.Z,{title:"Datasets",children:[(0,k.jsx)(n.X6,{mb:2,fontSize:"2xl",fontWeight:"semibold",children:"Datasets"}),(0,k.jsx)(n.xu,{mb:8,children:(0,k.jsxs)(i.aG,{fontWeight:"medium",fontSize:"sm",color:"gray.600",children:[(0,k.jsx)(i.gN,{children:(0,k.jsx)(l(),{href:"/dataset",children:"Datasets"})}),(0,k.jsx)(i.gN,{children:(0,k.jsx)(l(),{href:"#",children:"Select dataset"})})]})}),(0,k.jsx)(n.xu,{mb:4,children:e?(0,k.jsx)(r.$,{}):(0,k.jsx)(m,{})}),(0,k.jsx)(n.xu,{children:(0,k.jsx)(a.zx,{size:"sm",mr:2,variant:"outline","data-testid":"create-dataset-btn",children:(0,k.jsx)(l(),{href:"/dataset/new",children:"Create new dataset"})})})]})}},45460:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dataset",function(){return s(52363)}])}},function(e){e.O(0,[2437,4995,4409,9774,2888,179],(function(){return t=45460,e(e.s=t);var t}));var t=e.O();_N_E=t}]);