import{r as x,b3 as h,bk as j,j as e,b as f,B as u,b9 as o,e as c,aq as l,ar as p,as as g,Z as C}from"./index-dP1W1_bd.js";import{u as k}from"./useUpdateTdOrFvInfoService-Rjt2OAr8.js";const q=({isLoading:t})=>{const{setValue:r,control:i}=h(),[a,d,m,b]=j({name:["enabled","histograms","correlations","exactUniqueness"]});return k({enabled:a,histograms:d,correlations:m,exactUniqueness:b}),x.useEffect(()=>{a||(r("histograms",!1),r("correlations",!1),r("exactUniqueness",!1))},[a]),e.jsxs(e.Fragment,{children:[e.jsx(f,{bold:!0,mb:"8px",children:"Statistic configuration"}),e.jsxs(u,{alignItems:"center",gap:"8px",mb:"8px",children:[e.jsx(o,{control:i,name:"enabled",render:({field:{onChange:n,value:s}})=>e.jsx(c,{children:e.jsx(l,{checked:s,label:"enable statistics",disabled:t,onChange:()=>{n(!s),s&&r("statisticsColumns",[])}})})}),e.jsx(p,{mainText:"Includes descriptive statistics",children:e.jsx(g,{icon:C.info_block,size:"xs"})})]}),e.jsx(o,{control:i,name:"histograms",render:({field:{onChange:n,value:s}})=>e.jsx(c,{mb:"8px",children:e.jsx(l,{checked:s,label:"histograms",disabled:!a||t,onChange:()=>n(!s)})})}),e.jsx(o,{control:i,name:"correlations",render:({field:{onChange:n,value:s}})=>e.jsx(c,{mb:"8px",children:e.jsx(l,{checked:s,disabled:!a||t,label:"correlations",onChange:()=>n(!s)})})}),e.jsx(o,{control:i,name:"exactUniqueness",render:({field:{onChange:n,value:s}})=>e.jsx(c,{children:e.jsx(l,{checked:s,disabled:!a||t,label:"exact uniqueness",onChange:()=>n(!s)})})})]})},U=x.memo(q);export{U as S};
