import{r as d,aR as j,bc as b,j as e,c as f,a as u,aZ as c,L as o,an as l,ao as p,ap as g,d as C}from"./index-_eM6l4Nf.js";import{u as k}from"./useUpdateTdOrFvInfoService-Byz_Aakv.js";const q=({isLoading:t})=>{const{setValue:i,control:r}=j(),[n,x,m,h]=b({name:["enabled","histograms","correlations","exactUniqueness"]});return k({enabled:n,histograms:x,correlations:m,exactUniqueness:h}),d.useEffect(()=>{n||(i("histograms",!1),i("correlations",!1),i("exactUniqueness",!1))},[n]),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(c,{control:r,name:"enabled",render:({field:{onChange:a,value:s}})=>e.jsx(o,{children:e.jsx(l,{checked:s,label:"enable statistics",disabled:t,onChange:()=>{a(!s),s&&i("statisticsColumns",[])}})})}),e.jsx(p,{mainText:"Includes descriptive statistics",children:e.jsx(g,{icon:C.info_block,size:"xs"})})]}),e.jsx(c,{control:r,name:"histograms",render:({field:{onChange:a,value:s}})=>e.jsx(o,{mb:"8px",children:e.jsx(l,{checked:s,label:"histograms",disabled:!n||t,onChange:()=>a(!s)})})}),e.jsx(c,{control:r,name:"correlations",render:({field:{onChange:a,value:s}})=>e.jsx(o,{mb:"8px",children:e.jsx(l,{checked:s,disabled:!n||t,label:"correlations",onChange:()=>a(!s)})})}),e.jsx(c,{control:r,name:"exactUniqueness",render:({field:{onChange:a,value:s}})=>e.jsx(o,{children:e.jsx(l,{checked:s,disabled:!n||t,label:"exact uniqueness",onChange:()=>a(!s)})})})]})},U=d.memo(q);export{U as S};
