import{r as x,aG as b,bc as f,j as e,c as j,$ as u,aO as c,L as o,an as l,ao as p,ap as g,C}from"./index-46ma1THH.js";import{u as k}from"./useUpdateTdOrFvInfoService-BiDORrPs.js";const q=({isLoading:t})=>{const{setValue:i,control:r}=b(),[n,d,m,h]=f({name:["enabled","histograms","correlations","exactUniqueness"]});return k({enabled:n,histograms:d,correlations:m,exactUniqueness:h}),x.useEffect(()=>{n||(i("histograms",!1),i("correlations",!1),i("exactUniqueness",!1))},[n]),e.jsxs(e.Fragment,{children:[e.jsx(j,{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=x.memo(q);export{U as S};
