import { Env } from "../tools/env";

export function importStyle() {
    if ("node" === Env.mode) return;
    const styleElement = document.createElement("style");
    styleElement.id = "vtable-sheet-menu-styleSheet", styleElement.textContent = "\n.vtable-sheet-main-menu {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  height: 30px;\n  padding: 0;\n  border-bottom: 1px solid #e0e0e0;\n  display: flex;\n  align-items: center;\n  background-color: #fff;\n  width: 50px;\n  /* 内容居中 */\n  justify-content: center;\n  flex-shrink: 0; /* 防止菜单被压缩 */\n}\n.vtable-sheet-main-menu:hover {\n  background-color: #f0f0f0;\n}\n\n.vtable-sheet-main-menu-button {\n  display: flex;\n  align-items: center;\n  padding: 0 8px;\n  cursor: pointer;\n  height: 30px;\n}\n\n/* 菜单项容器 */\n.vtable-sheet-main-menu-container {\n  position: absolute;\n  top: 100%; /* 显示在按钮下方 */\n  left: 0;\n  background: white;\n  border: 1px solid #e0e0e0;\n  border-radius: 4px;\n  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n  z-index: 100;\n  display: none;\n}\n\n.vtable-sheet-main-menu-container.active {\n  display: block;\n}\n\n/* 菜单项列表（ul） */\n.vtable-sheet-main-menu-items {\n  list-style: none;\n  margin: 0;\n  padding: 4px 0;\n  min-width: 80px;\n  /* 删除以下两行 */\n  /* max-height: 300px; */\n  /* overflow-y: hidden; */\n}\n\n/* 当内容超出时显示滚动条 */\n.vtable-sheet-main-menu-items.scrollable {\n  overflow-y: auto;\n}\n\n/* 单个菜单项（li） */\n.vtable-sheet-main-menu-item {\n  padding: 6px 12px;\n  margin: 0; /* 清除默认外边距 */\n  line-height: 1.5; /* 统一行高 */\n  cursor: pointer;\n  white-space: nowrap;\n  color: #333;                 /* 文字颜色 */\n  font-size: 12px;             /* 字体大小 */\n  transition: background 0.2s; /* 悬停动画 */\n  \n  /* 禁用文本选中 */\n  user-select: none;\n  -webkit-user-select: none;\n}\n\n/* 悬停和激活状态 */\n.vtable-sheet-main-menu-item:hover,\n.vtable-sheet-main-menu-item:focus {\n  background-color: #f5f5f5;   /* 浅灰色背景 */\n}\n\n.vtable-sheet-main-menu-item:active {\n  background-color: #e0e0e0;   /* 点击时深灰色 */\n}\n\n/* 分隔线（可选） */\n.vtable-sheet-main-menu-item.divider {\n  border-top: 1px solid #e0e0e0;\n  margin: 4px 0;\n  padding: 0;\n  height: 1px;\n  cursor: default;\n}\n\n.vtable-sheet-main-menu-item-has-children {\n  position: relative;\n}\n\n.vtable-sheet-main-menu-item-has-children::after {\n  content: '>';\n  position: absolute;\n  right: 0px;\n  top: 50%;\n  transform: translateY(-50%);\n  margin-right: 10px;\n}\n/* 子菜单容器 */\n.vtable-sheet-submenu-container {\n  position: absolute;\n  left: 100%; /* 默认向右展开 */\n  top: 0;\n  min-width: 120px;\n  background: white;\n  border: 1px solid #e0e0e0;\n  border-radius: 4px;\n  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n  z-index: 200; /* 高于主菜单 */\n  display: none;\n}\n\n/* 激活时显示 */\n.vtable-sheet-main-menu-item:hover .vtable-sheet-submenu-container {\n  display: block;\n}\n\n/* 子菜单项 */\n.vtable-sheet-submenu-item {\n  position: relative; /* 为箭头定位 */\n  padding: 8px 12px;\n  cursor: pointer;\n  transition: background 0.2s;\n}\n\n.vtable-sheet-submenu-item:hover {\n  background: #f5f5f5;\n}\n\n/* 嵌套子菜单箭头 */\n.submenu-arrow {\n  position: absolute;\n  right: 8px;\n  font-size: 10px;\n  color: #999;\n}\n\n/* 响应式调整 */\n@media (max-width: 768px) {\n  .vtable-sheet-submenu-container {\n    left: auto !important;\n    right: 100%; /* 小屏幕改为向左展开 */\n  }\n}\n", 
    document.head.appendChild(styleElement);
}
//# sourceMappingURL=menu.js.map