/**
 * title: "可展开表格"
 * description: ""
 */
import React, { useState } from 'react';
import { Table } from '@alicloud/console-components';
import Actions, { LinkButton } from '@alicloud/console-components-actions';
var getDataSource = function () {
    var result = [];
    for (var i = 0; i < 5; i++) {
        result.push({
            id: 100306660940 + i,
            status: i % 2 === 0 ? '运行中' : '停用',
            type: '专用网络',
            title: '可以通过 expandedRowRender 额外渲染行',
        });
    }
    return result;
};
var render = function () {
    return (React.createElement(Actions, null,
        React.createElement(LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879"),
        React.createElement(LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879"),
        React.createElement(LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879"),
        React.createElement(LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879")));
};
var expandedStyle = {
    borderWidth: 0,
    borderStyle: 'solid',
    borderColor: '#e5e5e5',
    padding: '16px',
    background: '#ffffff',
};
var centerStyle = {
    height: '128px',
    borderRadius: '4px',
    lineHeight: '128px',
    background: '#f6f6f6',
    textAlign: 'center',
};
export default (function () {
    var dataSource = useState(getDataSource())[0];
    return (React.createElement(Table, { dataSource: dataSource, expandedRowRender: function () { return (React.createElement("div", { style: expandedStyle },
            React.createElement("div", { style: centerStyle }, "Content Placeholder"))); } },
        React.createElement(Table.Column, { title: "\u5B9E\u4F8BID/\u540D\u79F0", dataIndex: "id", width: 200 }),
        React.createElement(Table.Column, { title: "\u72B6\u6001", dataIndex: "status" }),
        React.createElement(Table.Column, { title: "\u7F51\u7EDC\u7C7B\u578B", dataIndex: "type" }),
        React.createElement(Table.Column, { title: "\u64CD\u4F5C", cell: render, width: 200 })));
});
