import './demo1.css';
// @ts-ignore
import CopyToClipboard from 'react-copy-to-clipboard';
import Icon from '..';
import React from 'react';
import ReactDOM from 'react-dom';
import { Message } from '../..';
const types = [
    'smile', 'cry', 'success', 'warning', 'prompt',
    'error', 'help', 'clock', 'success-filling', 'delete-filling',
    'favorites-filling', 'add', 'minus', 'arrow-up', 'arrow-down',
    'arrow-left', 'arrow-right', 'arrow-double-left', 'arrow-double-right', 'switch',
    'sorting', 'descending', 'ascending', 'select', 'semi-select',
    'loading', 'search', 'close', 'ellipsis', 'picture',
    'calendar', 'ashbin', 'upload', 'download', 'set',
    'edit', 'refresh', 'filter', 'attachment', 'account',
    'email', 'atm', 'copy', 'exit', 'eye', 'eye-close', 'toggle-left', 'toggle-right',
    'lock', 'unlock', 'chart-pie', 'chart-bar', 'form', 'detail', 'list', 'dashboard',
];
let customTypes = [];
// The code here is for fusion dev display custom Icon components only
if ('customIcons' in window) {
    customTypes = window.customIcons;
}
const handleCopy = () => Message.success('Copied!');
ReactDOM.render(React.createElement("div", null,
    React.createElement("div", { className: "icon-list-title" }, "Click on the icon to copy the code."),
    React.createElement("ul", { className: "icon-list" }, types.map((type, index) => (React.createElement(CopyToClipboard, { key: index, text: `<Icon type="${type}" />`, onCopy: handleCopy },
        React.createElement("li", null,
            React.createElement(Icon, { type: type, size: "xl" }),
            React.createElement("span", null, type)))))),
    customTypes.length ?
        React.createElement("div", null,
            React.createElement("div", { className: "icon-list-custom-title" }, "Custom Icon"),
            React.createElement("ul", { className: "icon-list" }, customTypes.map((type, index) => (React.createElement(CopyToClipboard, { key: index, text: `<Icon type="${type}" />`, onCopy: handleCopy },
                React.createElement("li", null,
                    React.createElement(Icon, { type: type, size: "xl" }),
                    React.createElement("span", null, type))))))) :
        null), document.getElementById('icon-demo-1'));
