"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * title: "下拉带搜索形态"
 * description: "自定义 menuProps 实现下拉带搜索形态"
 */
var react_1 = __importDefault(require("react"));
var console_components_1 = require("@alicloud/console-components");
var onChange = function (value) {
    console.log(value);
};
var dataSource1 = [
    {
        value: '1',
        label: '默认项',
    },
    {
        value: '2',
        label: '聚焦项',
    },
    {
        value: '3',
        label: '选中项',
    },
    {
        value: '4',
        label: '默认项',
    },
    {
        value: '5',
        label: '失效项',
        disabled: true,
    },
];
var dataSource = [
    { label: '内容描述，文案超出长度后允许自动换行，内容描述', value: '1' },
    { label: '内容描述，文案超出长度后允许自动换行，内容描述', value: '2' },
];
var menuProps1 = {
    focusable: false,
    header: (react_1.default.createElement("div", { style: { padding: '0 4px', textAlign: 'center' } },
        react_1.default.createElement("div", { style: { paddingBottom: 4 } },
            react_1.default.createElement(console_components_1.Input, { size: "small", placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", label: react_1.default.createElement(console_components_1.Icon, { type: "search" }) })))),
    footer: (react_1.default.createElement("div", { style: { padding: '0 4px', textAlign: 'center', margin: '0 -4px' } },
        react_1.default.createElement(console_components_1.Divider, { style: { marginBottom: 0, marginTop: 4 } }),
        react_1.default.createElement(console_components_1.Button, { text: true, type: "primary" }, "Load More..."))),
};
var menuProps2 = {
    focusable: false,
    header: (react_1.default.createElement("div", { style: { padding: '4px 4px 0' } },
        react_1.default.createElement("div", { style: { display: 'flex', paddingBottom: 4 } },
            react_1.default.createElement(console_components_1.Input, { size: "small", placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", label: react_1.default.createElement(console_components_1.Icon, { type: "search" }) }),
            react_1.default.createElement(console_components_1.Button, { size: "small", style: { marginLeft: '8px', width: '24px', padding: 0, flexShrink: 0 } },
                react_1.default.createElement(console_components_1.Icon, { type: "arrow_circular" }))))),
    footer: (react_1.default.createElement("div", { style: { padding: '0 4px', margin: '0 -4px' } },
        react_1.default.createElement(console_components_1.Divider, { style: { marginBottom: 0, marginTop: 4 } }),
        react_1.default.createElement("div", { style: { paddingLeft: 8 } },
            react_1.default.createElement(console_components_1.Button, { text: true, type: "primary" }, "\u524D\u5F80\u521B\u5EFAECS"),
            react_1.default.createElement(console_components_1.Icon, { type: "external" })))),
};
var menuProps3 = {
    focusable: false,
    header: (react_1.default.createElement("div", { style: { padding: '4px 4px 0' } },
        react_1.default.createElement("div", { style: { display: 'flex', paddingBottom: 4 } },
            react_1.default.createElement(console_components_1.Input, { size: "small", placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9", label: react_1.default.createElement(console_components_1.Icon, { type: "search" }) }),
            react_1.default.createElement(console_components_1.Button, { size: "small", style: { marginLeft: '8px', width: '24px', padding: 0, flexShrink: 0 } },
                react_1.default.createElement(console_components_1.Icon, { type: "arrow_circular" }))))),
    footer: (react_1.default.createElement("div", { style: { margin: '0 8px' } },
        "\u641C\u7D22\u7ED3\u679C\uFF1A\u6CA1\u6709\u627E\u5230\u76F8\u5173\u5B9E\u4F8B",
        react_1.default.createElement(console_components_1.Divider, { style: { marginBottom: 0, marginTop: 4 } }),
        react_1.default.createElement("div", null,
            "\u65E0\u5B9E\u4F8B\u539F\u56E0",
            react_1.default.createElement("p", null,
                "1. A\u539F\u56E0\u9020\u6210 ",
                react_1.default.createElement("a", { href: "#" }, "\u89E3\u51B3\u65B9\u6848a"),
                react_1.default.createElement("br", null),
                "2. B\u539F\u56E0\u9020\u6210 ",
                react_1.default.createElement("a", { href: "#" }, "\u89E3\u51B3\u65B9\u6848b"))))),
};
exports.default = (function () {
    return (react_1.default.createElement("div", null,
        react_1.default.createElement("h4", { style: { fontSize: '12px' } }, "\u9ED8\u8BA4"),
        react_1.default.createElement(console_components_1.Select, { showSearch: true, placeholder: "\u8BF7\u9009\u62E9", onChange: onChange, dataSource: dataSource1, style: {
                width: '280px',
            }, mode: "multiple", menuProps: menuProps1 }),
        react_1.default.createElement("h4", { style: { fontSize: '12px', marginTop: '24px' } }, "\u5E26\u5237\u65B0\u641C\u7D22\u9ED8\u8BA4"),
        react_1.default.createElement(console_components_1.Select, { mode: "multiple", dataSource: dataSource, style: { width: '280px' }, menuProps: menuProps2, popupAutoFocus: true }),
        react_1.default.createElement("h4", { style: { fontSize: '12px', marginTop: '24px' } }, "\u5E26\u5237\u65B0\u641C\u7D22\u65E0\u7ED3\u679C"),
        react_1.default.createElement(console_components_1.Select, { mode: "multiple", style: { width: '280px' }, menuProps: menuProps3, popupAutoFocus: true, dataSource: [] })));
});
