"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * title: "可展开表格"
 * description: ""
 */
var react_1 = __importStar(require("react"));
var console_components_1 = require("@alicloud/console-components");
var console_components_actions_1 = __importStar(require("@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_1.default.createElement(console_components_actions_1.default, null,
        react_1.default.createElement(console_components_actions_1.LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879"),
        react_1.default.createElement(console_components_actions_1.LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879"),
        react_1.default.createElement(console_components_actions_1.LinkButton, { onClick: function () { } }, "\u64CD\u4F5C\u9879"),
        react_1.default.createElement(console_components_actions_1.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',
};
exports.default = (function () {
    var dataSource = (0, react_1.useState)(getDataSource())[0];
    return (react_1.default.createElement(console_components_1.Table, { dataSource: dataSource, expandedRowRender: function () { return (react_1.default.createElement("div", { style: expandedStyle },
            react_1.default.createElement("div", { style: centerStyle }, "Content Placeholder"))); } },
        react_1.default.createElement(console_components_1.Table.Column, { title: "\u5B9E\u4F8BID/\u540D\u79F0", dataIndex: "id", width: 200 }),
        react_1.default.createElement(console_components_1.Table.Column, { title: "\u72B6\u6001", dataIndex: "status" }),
        react_1.default.createElement(console_components_1.Table.Column, { title: "\u7F51\u7EDC\u7C7B\u578B", dataIndex: "type" }),
        react_1.default.createElement(console_components_1.Table.Column, { title: "\u64CD\u4F5C", cell: render, width: 200 })));
});
