import Icon from '../../icon';
import Loading from '../../loading';
import React from 'react';
import ReactDOM from 'react-dom';
import Table from '..';
const dataSource = () => {
    const result = [];
    for (let i = 0; i < 5; i++) {
        result.push({
            title: {
                name: `Quotation for 1PCS Nano ${3 + i}.0 controller compatible`,
            },
            id: 100306660940 + i,
            time: 2000 + i,
        });
    }
    return result;
};
const render = (value, index, record) => {
    return React.createElement("a", { href: "javascript:;" },
        "Remove(",
        record.id,
        ")");
};
const indicator = (React.createElement("div", null,
    React.createElement(Icon, { type: "loading" })));
const CustomLoading = props => React.createElement(Loading, Object.assign({ indicator: indicator }, props));
ReactDOM.render(React.createElement(Table, { dataSource: dataSource(), loading: true, loadingComponent: CustomLoading },
    React.createElement(Table.Column, { title: "Id", dataIndex: "id" }),
    React.createElement(Table.Column, { title: "Title", dataIndex: "title.name" }),
    React.createElement(Table.Column, { title: "Time", dataIndex: "time" }),
    React.createElement(Table.Column, { cell: render })), document.getElementById('table-demo-23'));
