var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
/**
 * title: "单选选项卡（支持纵横布局）"
 * description: "通过设置Radio.Group的style属性，实现横向和纵向布局；灵活使用Radio，实现选项卡。"
 */
import React, { useState } from 'react';
import { Radio } from '@alicloud/console-components';
import styled from 'styled-components';
var List = [
    {
        label: '输入文字',
        value: 'A',
    },
    {
        label: '输入文字',
        value: 'B',
    },
    {
        label: '输入文字',
        value: 'C',
        disabled: true,
    },
    {
        label: '输入文字',
        value: 'D',
    },
];
var StyledDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  border-radius: 4px;\n  border: 1px solid #e5e5e5;\n  padding: 16px;\n  width: 254px;\n  box-sizing: content-box;\n  height:60px;\n  &:hover {\n    background-color: #f7f9fa;\n    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16);\n  }\n"], ["\n  border-radius: 4px;\n  border: 1px solid #e5e5e5;\n  padding: 16px;\n  width: 254px;\n  box-sizing: content-box;\n  height:60px;\n  &:hover {\n    background-color: #f7f9fa;\n    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16);\n  }\n"])));
var girdStyle = {
    display: 'grid',
    gridTemplateColumns: '1fr 1fr',
    grigTemplateRows: '1fr 1fr',
    gridColumnGap: '8px',
    gridRowGap: '8px',
    width: '512px',
};
export default (function () {
    var _a = useState(''), checkedList = _a[0], setCheckedList = _a[1];
    return (React.createElement("div", null,
        React.createElement(Radio.Group, { value: checkedList, onChange: function (value) { return setCheckedList("".concat(value)); }, style: girdStyle }, List.map(function (item) { return (React.createElement(StyledDiv, { style: checkedList === item.value ? { backgroundColor: '#eff3f8' } : {} },
            React.createElement(Radio, { value: item.value, disabled: item.disabled },
                item.label,
                React.createElement("p", { style: {
                        margin: '0 0 0 24px',
                        color: '#808080',
                    } },
                    "\u6309\u6307\u5B9AIP/\u5B9E\u4F8BID\u7533\u8BF7\uFF0C\u6BCF\u6708\u9650\u4F7F\u752820\u6B21\uFF0C\u5982\u9700\u63D0\u5347\u914D\u989D\u9700",
                    React.createElement("a", { style: { color: '#0064c8' } }, "\u63D0\u4EA4\u5DE5\u5355\u7533\u8BF7"))))); }))));
});
var templateObject_1;
