import{En as e,k as t,mr as n,rt as r,xt as i}from"./common.js";import{computed as a,createBlock as o,defineComponent as s,mergeProps as c,nextTick as l,openBlock as u,toHandlers as d,unref as f,useTemplateRef as p,watch as m}from"vue";import{throttle as h}from"lodash-es";var g=n(s({name:`MfScrollTable`,__name:`index`,props:{chart:{type:Object,required:!0},chartContain:{type:Object,required:!0}},setup(n){let s=n,{commonEvents:g,emitEvent:_}=r(s.chart,void 0,[`rowClick`]),v=i(),y=p(`scrollTableRef`),b=a(()=>({...s.chart.options,...s.chart.data?.dataSet}));m([()=>s.chartContain?.dropInfo?.width,()=>s.chartContain?.dropInfo?.height],h(()=>{y.value?.resize()},100)),m([()=>s.chartContain?.show,()=>s.chart?.showHide?.show],e=>{e&&l(()=>{y.value?.resize()})});function x(e){if(e.rowIndex>=0){let n=t(s.chart);n.length>e.rowIndex&&_(`rowClick`,n[e.rowIndex])}}let S=a(()=>{if(s.chart?.events?.emits&&s.chart.events.emits.length>0){for(let e of s.chart.events.emits)if(e===`rowClick`)return`allow-pointer`}});return(t,n)=>(u(),o(f(e),c({class:S.value,ref_key:`scrollTableRef`,ref:y,theme:f(v).getTheme,config:b.value},d(f(g)),{onRowClick:x}),null,16,[`class`,`theme`,`config`]))}}),[[`__scopeId`,`data-v-d370b1e5`]]);export{g as default};