"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 BottomItem_exports = {};
__export(BottomItem_exports, {
  default: () => BottomItem_default
});
module.exports = __toCommonJS(BottomItem_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_styled_components = __toESM(require("styled-components"));
var import_yoga = require("@gympass/yoga");
var import_Icon = __toESM(require("../../../Icon"));
var import_Box = __toESM(require("../../../Box"));
const StyledText = (0, import_styled_components.default)(import_yoga.Text.SmallestException)`
  ${({
  theme: {
    yoga: {
      components: {
        navigationmenu: { font }
      }
    }
  }
}) => import_styled_components.css`
      color: ${font.color.default};
      max-width: 100%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    `}
`;
const Active = import_styled_components.css`
  ${({
  theme: {
    yoga: {
      components: {
        navigationmenu: { backgroundColor, icon, font }
      }
    }
  }
}) => import_styled_components.css`
      background-color: ${backgroundColor.active};

      :not(:last-child) {
        pointer-events: none;
      }

      div {
        ${StyledText} {
          color: ${font.color.active};
          font-weight: ${font.weight.bold};
        }

        svg {
          fill: ${icon.fill.active};
        }
      }
    `}
`;
const StyledItem = import_styled_components.default.li`
  ${({
  isActive,
  theme: {
    yoga: {
      components: {
        navigationmenu: { backgroundColor, border, icon, font }
      }
    }
  }
}) => import_styled_components.css`
      transition: background-color 300ms ease-in-out;

      border-radius: ${border.radius.default}px;
      list-style-type: none;
      cursor: pointer;

      svg {
        height: ${icon.height}px;
        width: ${icon.width}px;
        fill: ${icon.fill.default};
      }

      &:hover,
      &:focus {
        ${!isActive && import_styled_components.css`
          background-color: ${backgroundColor.hover};

          ${StyledText} {
            color: ${font.color.hover};
          }

          svg {
            fill: ${icon.fill.hover};
          }
        `};
      }

      a {
        text-decoration: none;

        &.active {
          cursor: auto;

          ${Active}
        }
      }

      ${isActive && Active};
    `}
`;
const StyledTextContainer = (0, import_styled_components.default)(import_Box.default)`
  ${({
  theme: {
    yoga: {
      components: {
        navigationmenu: { border, gap, padding }
      }
    }
  }
}) => import_styled_components.css`
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: ${gap.xxxsmall}px;
      padding: ${padding.xxxsmall}px;
      border-radius: ${border.radius.default}px;
    `}
`;
const BottomItem = ({
  active = false,
  icon,
  label,
  wrapper: Wrapper
}) => {
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledItem, { isActive: active, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledTextContainer, { children: [
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Icon.default, { as: icon }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledText, { children: label })
  ] }) }) });
};
var BottomItem_default = BottomItem;
