(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9671],{105:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return H}});var r=t(77837),i=t(38860),a=t.n(i),l=t(34376),d=t.n(l),o=t(67971),s=t(28857),c=t(31969),u=t(10919),h=t(84201),f=t(11754),b=t(86673),m=t(47329),p=t.n(m);function x(e){return e.children}x.propTypes={afterChildren:p().node,beforeChildren:p().node,children:p().node.isRequired,disabled:p().bool,label:p().string.isRequired};var v=t(82684),j=t(46313),g=t(93461),Z=t(19711),y=t(2005),C=t(49125),_=t(73942),P=t(28598),k=j.default.div.withConfig({displayName:"Tabs__TabHeaderContainerStyle",componentId:"sc-rojme5-0"})(["",""],(function(e){return e.containerWidthPercentage&&"\n    width: ".concat(e.containerWidthPercentage,"%;\n  ")})),w=j.default.div.withConfig({displayName:"Tabs__TabHeader",componentId:"sc-rojme5-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;margin-right:","px;position:relative;z-index:2;"," "," ",""],_.BG,_.BG,6*C.iI,(function(e){return e.noBottomBorder&&"\n    border-bottom: none;\n  "}),(function(e){return e.active&&"\n    border-bottom: ".concat(C.cd,"px solid;\n    border-color: ").concat((e.theme.interactive||c.Z.interactive).linkPrimary,";\n  ")}),(function(e){return e.fullWidth&&"\n    width: 100%;\n  "})),T=j.default.div.withConfig({displayName:"Tabs__LinkStyle",componentId:"sc-rojme5-2"})(["align-items:center;display:flex;"," "," ",""],(function(e){return e.bold&&"\n    font-family: ".concat(y.nF,";\n  ")}),(function(e){return e.fullWidth&&"\n    justify-content: center;\n  "}),(function(e){return!e.disabled&&"\n    &:hover {\n      path {\n        fill: ".concat((e.theme.content||c.Z.interactive).linkPrimary," !important;\n      }\n    }\n  ")}));var N=function(e){var n=e.actionEl,t=e.bold,r=e.children,i=e.containerWidthPercentage,a=e.currentTab,l=e.defaultKey,d=e.fullWidth,s=e.large,c=e.noBottomBorder,h=e.onChange,f=Array.isArray(r)?r.filter((function(e){return!!e})):[r],m=v.Children.map(f,(function(e){return e.key})),p=(0,v.useState)(l||m[0]),x=p[0],j=p[1],y=a||x;return(0,v.useEffect)((function(){j(l)}),[l]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(k,{containerWidthPercentage:i,children:(0,P.jsxs)(o.Z,{justifyContent:d?"center":null,children:[n&&(0,P.jsx)(g.Z,{flex:"1",children:n}),v.Children.map(f,(function(e){var n=e.key,r=e.props,i=y===n,a={default:!i,disabled:r.disabled,size:2*C.iI};return(0,P.jsx)(g.Z,{flex:d?"1":null,children:(0,P.jsx)(u.Z,{block:!0,default:!i,disabled:r.disabled,flex:1,large:s,noHoverUnderline:!0,noOutline:!0,onClick:function(){h&&h(n),j(n)},preventDefault:!0,sameColorAsText:i,children:(0,P.jsx)(w,{active:i,fullWidth:d,noBottomBorder:c,children:(0,P.jsxs)(T,{bold:t&&i,disabled:r.disabled,fullWidth:d,large:s,children:[r.beforeChildren&&v.cloneElement(r.beforeChildren,a),(0,P.jsx)(b.Z,{ml:r.beforeChildren?1:0,mr:r.afterChildren?1:0,children:(0,P.jsx)(Z.ZP,{bold:t,large:s,children:r.label})}),r.afterChildren&&v.cloneElement(r.afterChildren,a)]})})})},n)}))]})}),f.filter((function(e){return e.key===y}))]})},B=t(54626),E=t(10503),W=t(69345),I=t(5679),A=t(24224),D=function(){var e=B.ZP.feature_sets.list().data,n=e?(0,A.YC)(e,(function(e){return e.id}),{ascending:!1}):[];return(0,P.jsx)(s.Z,{centerAlign:!0,header:(0,P.jsx)(b.Z,{mt:C.iI}),pageTitle:"Dataset Dashboard",children:(0,P.jsx)(b.Z,{px:1,children:(0,P.jsx)(N,{bold:!0,defaultKey:"datasets",large:!0,children:(0,P.jsx)(x,{label:"Datasets",children:(0,P.jsx)(b.Z,{pb:3,pt:3,children:(0,P.jsx)(f.Z,{headerDetails:(0,I._6)("dataset",null===n||void 0===n?void 0:n.length),headerTitle:"datasets",children:(null===n||void 0===n?void 0:n.length)>0?null===n||void 0===n?void 0:n.map((function(e,t){var r=e||{},i=r.id,a=r.metadata||{},l=a.column_types,s=void 0===l?{}:l,c=a.name,f=void 0===c?"dataset_".concat(i):c,m=a.statistics||{},p=m.count,x=m.quality,v=s?Object.keys(s).length:0;return(0,P.jsxs)(h.Z,{columnFlexNumbers:[4,1,1,1],last:t===n.length-1,children:[(0,P.jsxs)(o.Z,{alignItems:"center",children:[(0,P.jsx)(E.$B,{secondary:!0}),(0,P.jsx)(b.Z,{mr:1}),(0,P.jsx)(u.Z,{noHoverUnderline:!0,onClick:function(){return d().push("datasets/".concat(i))},preventDefault:!0,sameColorAsText:!0,children:f})]}),(0,P.jsxs)(Z.ZP,{children:[(0,I.x6)(v)," features"]}),(0,P.jsxs)(Z.ZP,{children:[(0,I.x6)(p)," rows"]}),(0,P.jsx)(Z.ZP,{bold:(0,W.FH)(x),danger:(0,W.FH)(x),children:x})]},i)})):(0,P.jsx)(b.Z,{p:2,children:(0,P.jsx)(Z.ZP,{children:"No datasets available. Add one to get started."})})})})},"datasets")})})})};D.getInitialProps=(0,r.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{themeProps:{currentTheme:c.Z}});case 1:case"end":return e.stop()}}),e)})));var H=D},11246:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/datasets",function(){return t(105)}])}},function(e){e.O(0,[4259,240,7673,3887,9774,2888,179],(function(){return n=11246,e(e.s=n);var n}));var n=e.O();_N_E=n}]);