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