import{r as d,ay as f,aO as j,j as e,y as b,d as u,aF as c,c as o,al as l,am as p,an as g,T as C}from"./index-CK33qGU_.js";import{u as F}from"./useUpdateTdOrFvInfoService-iD5D3Lyd.js";const k=({isLoading:t})=>{const{setValue:i,control:r}=f(),[n,x,m,h]=j({name:["enabled","histograms","correlations","exactUniqueness"]});return F({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(b,{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(k);export{U as S};
