"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.iconToString = exports.NaturallySizedIcon = exports.Icon = exports.allIcons = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ReactDOMServer = tslib_1.__importStar(require("react-dom/server"));
const arrow_right_1 = tslib_1.__importDefault(require("./arrow-right"));
const arrow_down_1 = tslib_1.__importDefault(require("./arrow-down"));
const arrow_up_1 = tslib_1.__importDefault(require("./arrow-up"));
const arrow_up_long_1 = tslib_1.__importDefault(require("./arrow-up-long"));
const arrow_down_long_1 = tslib_1.__importDefault(require("./arrow-down-long"));
const arrow_left_1 = tslib_1.__importDefault(require("./arrow-left"));
const triangle_up_1 = tslib_1.__importDefault(require("./triangle-up"));
const triangle_down_1 = tslib_1.__importDefault(require("./triangle-down"));
const check_1 = tslib_1.__importDefault(require("./check"));
const attach_file_1 = tslib_1.__importDefault(require("./attach-file"));
const plus_1 = tslib_1.__importDefault(require("./plus"));
const person_1 = tslib_1.__importDefault(require("./person"));
const clone_1 = tslib_1.__importDefault(require("./clone"));
const chat_1 = tslib_1.__importDefault(require("./chat"));
const query_1 = tslib_1.__importDefault(require("./query"));
const info_1 = tslib_1.__importDefault(require("./info"));
const alert_1 = tslib_1.__importDefault(require("./alert"));
const list_1 = tslib_1.__importDefault(require("./list"));
const home_1 = tslib_1.__importDefault(require("./home"));
const call_1 = tslib_1.__importDefault(require("./call"));
const justify_1 = tslib_1.__importDefault(require("./justify"));
const error_1 = tslib_1.__importDefault(require("./error"));
const export_1 = tslib_1.__importDefault(require("./export"));
const fdc3_1 = tslib_1.__importDefault(require("./fdc3"));
const campaign_1 = tslib_1.__importDefault(require("./campaign"));
const build_1 = tslib_1.__importDefault(require("./build"));
const warning_1 = tslib_1.__importDefault(require("./warning"));
const dashboard_1 = tslib_1.__importDefault(require("./dashboard"));
const undo_1 = tslib_1.__importDefault(require("./undo"));
const fast_forward_1 = tslib_1.__importDefault(require("./fast-forward"));
const fast_backward_1 = tslib_1.__importDefault(require("./fast-backward"));
const sort_asc_1 = tslib_1.__importDefault(require("./sort-asc"));
const sort_desc_1 = tslib_1.__importDefault(require("./sort-desc"));
const calendar_1 = tslib_1.__importDefault(require("./calendar"));
const delete_1 = tslib_1.__importDefault(require("./delete"));
const csv_1 = tslib_1.__importDefault(require("./csv"));
const excel_1 = tslib_1.__importDefault(require("./excel"));
const check_circle_1 = tslib_1.__importDefault(require("./check-circle"));
const refresh_1 = tslib_1.__importDefault(require("./refresh"));
const save_1 = tslib_1.__importDefault(require("./save"));
const chart_1 = tslib_1.__importDefault(require("./chart"));
const application_1 = tslib_1.__importDefault(require("./application"));
const bulk_update_1 = tslib_1.__importDefault(require("./bulk-update"));
const import_export_1 = tslib_1.__importDefault(require("./import-export"));
const import_1 = tslib_1.__importDefault(require("./import"));
const calculated_column_1 = tslib_1.__importDefault(require("./calculated-column"));
const cell_summary_1 = tslib_1.__importDefault(require("./cell-summary"));
const column_chooser_1 = tslib_1.__importDefault(require("./column-chooser"));
const column_add_1 = tslib_1.__importDefault(require("./column-add"));
const cell_validation_1 = tslib_1.__importDefault(require("./cell-validation"));
const column_filter_1 = tslib_1.__importDefault(require("./column-filter"));
const column_outline_1 = tslib_1.__importDefault(require("./column-outline"));
const system_status_1 = tslib_1.__importDefault(require("./system-status"));
const data_set_1 = tslib_1.__importDefault(require("./data-set"));
const data_object_1 = tslib_1.__importDefault(require("./data-object"));
const flashing_cell_1 = tslib_1.__importDefault(require("./flashing-cell"));
const edit_1 = tslib_1.__importDefault(require("./edit"));
const equation_1 = tslib_1.__importDefault(require("./equation"));
const format_column_1 = tslib_1.__importDefault(require("./format-column"));
const table_arrow_right_1 = tslib_1.__importDefault(require("./table-arrow-right"));
const freetext_column_1 = tslib_1.__importDefault(require("./freetext-column"));
const comment_1 = tslib_1.__importDefault(require("./comment"));
const layout_1 = tslib_1.__importDefault(require("./layout"));
const state_management_1 = tslib_1.__importDefault(require("./state-management"));
const tool_panel_1 = tslib_1.__importDefault(require("./tool-panel"));
const percent_bar_1 = tslib_1.__importDefault(require("./percent-bar"));
const spark_line_1 = tslib_1.__importDefault(require("./spark-line"));
const resume_1 = tslib_1.__importDefault(require("./resume"));
const pie_chart_1 = tslib_1.__importDefault(require("./pie-chart"));
const plus_minus_1 = tslib_1.__importDefault(require("./plus-minus"));
const quick_search_1 = tslib_1.__importDefault(require("./quick-search"));
const reminder_1 = tslib_1.__importDefault(require("./reminder"));
const schedule_1 = tslib_1.__importDefault(require("./schedule"));
const inspector_1 = tslib_1.__importDefault(require("./inspector"));
const shortcut_1 = tslib_1.__importDefault(require("./shortcut"));
const updated_row_1 = tslib_1.__importDefault(require("./updated-row"));
const logout_1 = tslib_1.__importDefault(require("./logout"));
const theme_1 = tslib_1.__importDefault(require("./theme"));
const check_box_1 = tslib_1.__importDefault(require("./check-box"));
const check_box_outline_1 = tslib_1.__importDefault(require("./check-box-outline"));
const boolean_list_1 = tslib_1.__importDefault(require("./boolean-list"));
const tab_unselected_1 = tslib_1.__importDefault(require("./tab-unselected"));
const cloud_upload_1 = tslib_1.__importDefault(require("./cloud-upload"));
const upload_1 = tslib_1.__importDefault(require("./upload"));
const ipushpull_1 = tslib_1.__importDefault(require("./ipushpull"));
const folder_open_1 = tslib_1.__importDefault(require("./folder-open"));
const open_in_new_1 = tslib_1.__importDefault(require("./open-in-new"));
const folder_1 = tslib_1.__importDefault(require("./folder"));
const folder_shared_1 = tslib_1.__importDefault(require("./folder-shared"));
const play_1 = tslib_1.__importDefault(require("./play"));
const stop_1 = tslib_1.__importDefault(require("./stop"));
const pause_1 = tslib_1.__importDefault(require("./pause"));
const newpage_1 = tslib_1.__importDefault(require("./newpage"));
const drag_1 = tslib_1.__importDefault(require("./drag"));
const hide_column_1 = tslib_1.__importDefault(require("./hide-column"));
const show_column_1 = tslib_1.__importDefault(require("./show-column"));
const date_range_1 = tslib_1.__importDefault(require("./date-range"));
const settings_1 = tslib_1.__importDefault(require("./settings"));
const dock_1 = tslib_1.__importDefault(require("./dock"));
const collapse_1 = tslib_1.__importDefault(require("./collapse"));
const expand_1 = tslib_1.__importDefault(require("./expand"));
const arrow_expand_1 = tslib_1.__importDefault(require("./arrow-expand"));
const history_1 = tslib_1.__importDefault(require("./history"));
const filter_1 = tslib_1.__importDefault(require("./filter"));
const filter_off_1 = tslib_1.__importDefault(require("./filter-off"));
const close_1 = tslib_1.__importDefault(require("./close"));
const function_1 = tslib_1.__importDefault(require("./function"));
const greater_than_or_equal_1 = tslib_1.__importDefault(require("./greater-than-or-equal"));
const greater_than_1 = tslib_1.__importDefault(require("./greater-than"));
const less_than_or_equal_1 = tslib_1.__importDefault(require("./less-than-or-equal"));
const less_than_1 = tslib_1.__importDefault(require("./less-than"));
const minus_1 = tslib_1.__importDefault(require("./minus"));
const multiplication_1 = tslib_1.__importDefault(require("./multiplication"));
const division_1 = tslib_1.__importDefault(require("./division"));
const percent_1 = tslib_1.__importDefault(require("./percent"));
const exponent_1 = tslib_1.__importDefault(require("./exponent"));
const equal_1 = tslib_1.__importDefault(require("./equal"));
const not_equal_1 = tslib_1.__importDefault(require("./not-equal"));
const ends_with_1 = tslib_1.__importDefault(require("./ends-with"));
const starts_with_1 = tslib_1.__importDefault(require("./starts-with"));
const blanks_1 = tslib_1.__importDefault(require("./blanks"));
const non_blanks_1 = tslib_1.__importDefault(require("./non-blanks"));
const contains_1 = tslib_1.__importDefault(require("./contains"));
const not_contains_1 = tslib_1.__importDefault(require("./not-contains"));
const regex_1 = tslib_1.__importDefault(require("./regex"));
const track_changes_1 = tslib_1.__importDefault(require("./track-changes"));
const menu_1 = tslib_1.__importDefault(require("./menu"));
const statusbar_1 = tslib_1.__importDefault(require("./statusbar"));
const add_row_1 = tslib_1.__importDefault(require("./add-row"));
const brush_1 = tslib_1.__importDefault(require("./brush"));
const gradient_1 = tslib_1.__importDefault(require("./gradient"));
const badge_1 = tslib_1.__importDefault(require("./badge"));
const italic_1 = tslib_1.__importDefault(require("./italic"));
const bold_1 = tslib_1.__importDefault(require("./bold"));
const align_left_1 = tslib_1.__importDefault(require("./align-left"));
const align_right_1 = tslib_1.__importDefault(require("./align-right"));
const align_center_1 = tslib_1.__importDefault(require("./align-center"));
const overline_1 = tslib_1.__importDefault(require("./overline"));
const underline_1 = tslib_1.__importDefault(require("./underline"));
const strikethrough_1 = tslib_1.__importDefault(require("./strikethrough"));
const case_lower_1 = tslib_1.__importDefault(require("./case-lower"));
const case_upper_1 = tslib_1.__importDefault(require("./case-upper"));
const case_sentence_1 = tslib_1.__importDefault(require("./case-sentence"));
const grid_filter_1 = tslib_1.__importDefault(require("./grid-filter"));
const grid_info_1 = tslib_1.__importDefault(require("./grid-info"));
const rows_1 = tslib_1.__importDefault(require("./rows"));
const quote_1 = tslib_1.__importDefault(require("./quote"));
const news_1 = tslib_1.__importDefault(require("./news"));
const instrument_1 = tslib_1.__importDefault(require("./instrument"));
const analysis_1 = tslib_1.__importDefault(require("./analysis"));
const visibility_1 = tslib_1.__importDefault(require("./visibility"));
const visibility_off_1 = tslib_1.__importDefault(require("./visibility-off"));
const mail_1 = tslib_1.__importDefault(require("./mail"));
const dollar_1 = tslib_1.__importDefault(require("./dollar"));
const organisation_1 = tslib_1.__importDefault(require("./organisation"));
const science_1 = tslib_1.__importDefault(require("./science"));
const interactions_1 = tslib_1.__importDefault(require("./interactions"));
const money_1 = tslib_1.__importDefault(require("./money"));
const order_1 = tslib_1.__importDefault(require("./order"));
const contact_1 = tslib_1.__importDefault(require("./contact"));
const note_1 = tslib_1.__importDefault(require("./note"));
const comments_1 = tslib_1.__importDefault(require("./comments"));
const select_all_1 = tslib_1.__importDefault(require("./select-all"));
const select_off_1 = tslib_1.__importDefault(require("./select-off"));
const select_fwd_1 = tslib_1.__importDefault(require("./select-fwd"));
const copy_1 = tslib_1.__importDefault(require("./copy"));
const expand_all_1 = tslib_1.__importDefault(require("./expand-all"));
const collapse_all_1 = tslib_1.__importDefault(require("./collapse-all"));
const sync_1 = tslib_1.__importDefault(require("./sync"));
const styled_grid_1 = tslib_1.__importDefault(require("./styled-grid"));
const Icon_1 = require("../Icon");
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
exports.allIcons = {
    search: query_1.default, // original icon is search
    grid: layout_1.default, // original icon is apps,
    cells: cell_summary_1.default, // original icon is view-module
    columns: column_chooser_1.default,
    copy: copy_1.default,
    'calculated-column': calculated_column_1.default, // original icon is phone-setup
    laptop: application_1.default, // original icon is   laptop,
    alert: alert_1.default,
    building: analysis_1.default,
    'edit-table': bulk_update_1.default, // original icon is update,
    chart: chart_1.default, // original icon is bar-chart
    'column-add': column_add_1.default,
    person: person_1.default,
    quote: quote_1.default,
    call: call_1.default,
    news: news_1.default,
    brush: brush_1.default,
    'data-set': data_set_1.default,
    excel: excel_1.default,
    json: data_object_1.default,
    export: export_1.default,
    broadcast: campaign_1.default,
    theme: theme_1.default, // original icon is color-fill
    brain: instrument_1.default,
    calendar: calendar_1.default,
    chat: chat_1.default,
    'filter-list': column_filter_1.default, // original icon is filter-list
    'column-outline': column_outline_1.default,
    'grid-filter': grid_filter_1.default,
    'grid-info': grid_info_1.default,
    filter: filter_1.default,
    'filter-off': filter_off_1.default,
    'search-table': quick_search_1.default, // original icon is page-view
    lightning: flashing_cell_1.default, // flashOn,
    'color-palette': format_column_1.default, /// color-lens
    'export-data': table_arrow_right_1.default, /// color-lens
    'horizontal-lines': freetext_column_1.default, //  short-text
    'percent-tag': percent_bar_1.default, // linear-scale
    'spark-line': spark_line_1.default, //    show-chart
    resume: resume_1.default, //    unsuspend
    csv: csv_1.default,
    'pie-chart': pie_chart_1.default,
    'add-circle': plus_minus_1.default, //add-circle
    reminder: reminder_1.default, // alarm_on
    schedule: schedule_1.default, // schedule
    link: shortcut_1.default, // link
    assignment: state_management_1.default, //   assignment,
    clipboard: tool_panel_1.default,
    'traffic-lights': system_status_1.default, // was traffic
    add: add_row_1.default,
    downloaded: updated_row_1.default, //   system-update
    // others
    edit: edit_1.default,
    undo: undo_1.default,
    clone: clone_1.default,
    save: save_1.default,
    refresh: refresh_1.default,
    delete: delete_1.default,
    'tab-unselected': tab_unselected_1.default,
    'select-all': select_all_1.default,
    'select-off': select_off_1.default,
    'select-fwd': select_fwd_1.default,
    checked: check_box_1.default,
    unchecked: check_box_outline_1.default,
    'boolean-list': boolean_list_1.default,
    'arrow-right': arrow_right_1.default,
    'arrow-left': arrow_left_1.default,
    'arrow-up': arrow_up_1.default,
    'arrow-down': arrow_down_1.default,
    'arrow-up-long': arrow_up_long_1.default,
    'arrow-down-long': arrow_down_long_1.default,
    'triangle-up': triangle_up_1.default,
    'triangle-down': triangle_down_1.default,
    'check-circle': check_circle_1.default,
    comment: comment_1.default,
    list: list_1.default,
    spanner: build_1.default,
    error: error_1.default,
    play: play_1.default,
    stop: stop_1.default,
    pause: pause_1.default,
    'fast-forward': fast_forward_1.default,
    'fast-backward': fast_backward_1.default,
    warning: warning_1.default,
    check: check_1.default,
    'open-in-new': open_in_new_1.default,
    home: home_1.default,
    'sort-asc': sort_asc_1.default,
    'sort-desc': sort_desc_1.default,
    logout: logout_1.default,
    'import-export': import_export_1.default,
    import: import_1.default,
    inspector: inspector_1.default,
    paperclip: attach_file_1.default,
    info: info_1.default,
    'cloud-upload': cloud_upload_1.default,
    upload: upload_1.default,
    download: ipushpull_1.default,
    'folder-open': folder_open_1.default,
    'folder-shared': folder_shared_1.default,
    folder: folder_1.default,
    newpage: newpage_1.default, //note_add
    drag: drag_1.default,
    'date-range': date_range_1.default,
    settings: settings_1.default,
    dock: dock_1.default,
    collapse: collapse_1.default,
    expand: expand_1.default,
    'arrow-expand': arrow_expand_1.default,
    history: history_1.default,
    close: close_1.default,
    function: function_1.default,
    equation: equation_1.default,
    equals: equal_1.default,
    'not-equal': not_equal_1.default,
    'greater-than-or-equal': greater_than_or_equal_1.default,
    'greater-than': greater_than_1.default,
    'less-than-or-equal': less_than_or_equal_1.default,
    'less-than': less_than_1.default,
    plus: plus_1.default,
    minus: minus_1.default,
    multiplication: multiplication_1.default,
    division: division_1.default,
    percent: percent_1.default,
    exponent: exponent_1.default,
    'ends-with': ends_with_1.default,
    'starts-with': starts_with_1.default,
    'unfilled-circle': blanks_1.default,
    'filled-circle': non_blanks_1.default,
    'not-contains': not_contains_1.default,
    contains: contains_1.default,
    regex: regex_1.default,
    target: track_changes_1.default,
    menu: menu_1.default,
    statusbar: statusbar_1.default,
    dashboard: dashboard_1.default,
    'visibility-on': visibility_1.default,
    'visibility-off': visibility_off_1.default,
    'visibility-off-bold': hide_column_1.default,
    'visibility-on-bold': show_column_1.default,
    gradient: gradient_1.default,
    badge: badge_1.default,
    bold: bold_1.default,
    italic: italic_1.default,
    'align-left': align_left_1.default,
    'align-right': align_right_1.default,
    'align-center': align_center_1.default,
    'align-justify': justify_1.default,
    underline: underline_1.default,
    overline: overline_1.default,
    strikethrough: strikethrough_1.default,
    'case-lower': case_lower_1.default,
    'case-upper': case_upper_1.default,
    'case-sentence': case_sentence_1.default,
    flag: cell_validation_1.default, // original icon is flag,
    fdc3: fdc3_1.default,
    mail: mail_1.default,
    dollar: dollar_1.default,
    organisation: organisation_1.default,
    science: science_1.default,
    interactions: interactions_1.default,
    money: money_1.default,
    order: order_1.default,
    contact: contact_1.default,
    note: note_1.default,
    comments: comments_1.default,
    rows: rows_1.default,
    'expand-all': expand_all_1.default,
    'collapse-all': collapse_all_1.default,
    sync: sync_1.default,
    'styled-grid': styled_grid_1.default,
};
Object.keys(exports.allIcons).forEach((name) => {
    const ReactCmp = exports.allIcons[name];
    exports.allIcons[name] = (props) => React.createElement(ReactCmp, { ...props, name: name });
});
const Icon = ({ name, style, className, tabIndex, ...props }) => {
    const IconCmp = (exports.allIcons[name] || null);
    if (!IconCmp) {
        AdaptableLogger_1.AdaptableLogger.consoleWarnBase('NO icon found for ' + name);
        return React.createElement("svg", { height: "17", width: "17" });
    }
    return React.createElement(IconCmp, { tabIndex: tabIndex, ...props, style: style, name: name, className: className });
};
exports.Icon = Icon;
const NaturallySizedIcon = (props) => {
    return React.createElement(exports.Icon, { ...props, size: '1.5em', style: { marginTop: '-0.125em', ...props.style } });
};
exports.NaturallySizedIcon = NaturallySizedIcon;
const iconToString = (icon, style) => {
    if (!icon) {
        return;
    }
    return ReactDOMServer.renderToString(React.createElement(Icon_1.IconComponent, { icon: { ...icon, style: { ...icon.style, ...style } } }));
};
exports.iconToString = iconToString;
