"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 Icons_stories_exports = {};
__export(Icons_stories_exports, {
  IconGrid: () => IconGrid,
  default: () => Icons_stories_default
});
module.exports = __toCommonJS(Icons_stories_exports);
var import_react = __toESM(require("react"));
var Icons = __toESM(require("@ledgerhq/icons-ui/react"));
var import_styled_components = __toESM(require("styled-components"));
var import__ = require("../../..");
var import_styled_components2 = require("styled-components");
var Icons_stories_default = {
  title: "asorted/Icons",
  components: Icons
};
const IconContainer = (0, import_styled_components.default)(import__.Flex).attrs({
  flexDirection: "column",
  justifyContent: "flex-end",
  alignItems: "center",
  p: 4,
  fill: "black"
})`
  ${(p) => p.active ? `background-color: ${p.theme.colors.neutral.c20};` : ``}
  border-radius: 4px;
  height: 100px;
`;
const IconGridTemplate = ({ size, color, style }) => {
  const iconNames = Object.keys(Icons);
  const theme = (0, import_styled_components2.useTheme)();
  const selectedColor = color || theme.colors.neutral.c100;
  return /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: "10px" } }, iconNames.map((iconName) => {
    const IconComponent = Icons[iconName];
    return /* @__PURE__ */ import_react.default.createElement(IconContainer, { key: iconName }, /* @__PURE__ */ import_react.default.createElement(IconComponent, { size, color: selectedColor, style }), /* @__PURE__ */ import_react.default.createElement(import__.Text, { pt: 6 }, iconName));
  }));
};
const IconGrid = (args) => /* @__PURE__ */ import_react.default.createElement(IconGridTemplate, { ...args });
IconGrid.args = {
  size: "M",
  color: "",
  style: {}
};
IconGrid.argTypes = {
  size: {
    options: ["XS", "S", "M", "L", "XL", "XXL"],
    control: {
      type: "select"
    }
  },
  color: { control: "color" },
  style: { control: "object" }
};
//# sourceMappingURL=Icons.stories.js.map
