"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var index_story_exports = {};
__export(index_story_exports, {
  default: () => index_story_default
});
module.exports = __toCommonJS(index_story_exports);
var React = __toESM(require("react"));
var import_Sections = require("@wix/wix-storybook-utils/Sections");
var import_category_list = __toESM(require("../../components/category-list"));
var import_style_st = require("./style.st.css");
var import_icons_example = __toESM(require("../../components/icons-example"));
var import_metadata = require("../../../odeditor/system/metadata");
var iconComponents = __toESM(require("../../../odeditor/system/dist"));
var import_APITable = __toESM(require("../../APITable"));
var import_utils = require("../../utils");
var import_constants = require("../../constants");
const mapIconToRow = ({ title: _title, sizes }) => {
  const iconSize = Object.keys(sizes).length ? Object.keys(sizes)[0] : "";
  const Icon = iconComponents[_title];
  return [Icon && /* @__PURE__ */ React.createElement(Icon, null), _title, iconSize && `${iconSize}x${iconSize}`];
};
const tableHeaderTitles = ["Icon", "Icon Name", "Icon Size"];
const iconSizeKeys = (0, import_utils.getIconSizeKeys)(import_metadata.systemIconsMetadata);
const searchKeys = ["title", ...iconSizeKeys, "tags", "aliases"];
var index_story_default = {
  category: import_constants.ODEDITOR_CATEGORY,
  storyName: import_constants.SYSTEM_ICONS,
  component: () => /* @__PURE__ */ React.createElement(import_icons_example.default, { dataHook: "icon-list", ...{ iconComponents } }),
  sections: [
    (0, import_Sections.header)({
      // TODO: Add example icons
      // component: (
      //   <HeaderIcons>
      //   </HeaderIcons>
      // ),
      sourceUrl: "https://github.com/wix-private/wix-design-systems/tree/master/packages/wix-ui-icons-common/src/odeditor/system/raw"
    }),
    (0, import_Sections.tabs)([
      (0, import_Sections.tab)({
        title: "Icon List",
        sections: [
          (0, import_Sections.importExample)(
            "import { Text } from '@wix/wix-ui-icons-common/odeditor/system';"
          ),
          (0, import_Sections.divider)(),
          (0, import_Sections.title)("Categories"),
          (0, import_Sections.description)({
            text: "The usage of each icon type is determined by intention and size. Icons should be used strictly according to the description."
          }),
          /* @__PURE__ */ React.createElement(
            import_category_list.default,
            {
              dataHook: "icon-list",
              className: import_style_st.classes.tableList,
              iconsMetadata: import_metadata.systemIconsMetadata,
              ...{
                tableHeaderTitles,
                searchKeys,
                mapIconToRow
              }
            }
          )
        ]
      }),
      (0, import_Sections.tab)({
        title: "API",
        sections: [(0, import_Sections.description)({ title: "Props", text: import_APITable.default })]
      })
    ])
  ]
};
