import { jsx } from "react/jsx-runtime";
import { observer } from "@tachybase/schema";
import { Table } from "antd";
import { useTranslation } from "react-i18next";
const xlsxPreviewTable = observer((props)=>{
    const { filedata } = props;
    const { t } = useTranslation();
    const previewTablecolumns = filedata.fields.map((field)=>({
            title: field.uiSchema.title,
            dataIndex: field.name,
            key: field.name,
            render: (text)=>text,
            width: 200
        }));
    return /*#__PURE__*/ jsx(Table, {
        bordered: true,
        size: "small",
        columns: previewTablecolumns,
        dataSource: filedata.data,
        scroll: {
            y: 300,
            x: 'max-content'
        },
        pagination: false,
        rowKey: "name"
    });
}, {
    displayName: 'PreviewTable'
});
export { xlsxPreviewTable };
