'use client' import { useEffect, useState } from 'react' import { useMessage } from '@/hooks/useMessage' import WithDraggable from '@/components/common/draggable/WithDraggable' import { moduleStatisticsState } from '@/store/circuitTrestleAtom' import { useRecoilValue, useResetRecoilState } from 'recoil' import { useModule } from '@/hooks/module/useModule' import { useEavesGableEdit } from '@/hooks/roofcover/useEavesGableEdit' export default function PanelBatchStatistics() { const { getMessage } = useMessage() const [isFold, setIsFold] = useState(false) const [pos, setPos] = useState({ x: 0, y: 30, }) const { header, rows, footer } = useRecoilValue(moduleStatisticsState) const { setModuleStatisticsData } = useModule() useEffect(() => { setModuleStatisticsData() }, []) return (

{getMessage('modal.panel.batch.statistic')}

{header.map((item, index) => ( ))} {rows.map((row, index) => ( {header.map((item, i) => ( ))} ))} {header.map((header, index) => ( ))}
{item.name}
{typeof row[item.prop] === 'number' ? row[item.prop].toLocaleString('ko-KR', { maximumFractionDigits: 4 }) : row[item.prop]}
{typeof footer[header.prop] === 'number' ? footer[header.prop].toLocaleString('ko-KR', { maximumFractionDigits: 4 }) : footer[header.prop]}
) }