import { av as t, gr as e, gs as o, gt as a } from "./index-8935f1b4.js";
import { _ as s } from "./lodash-226cb5b1.js";
const r = [{ name: t("shortcut.global"), shortcuts: [{ name: t("shortcut.toggleShortcutList"), keys: [{ key: "?" }], target: "global", action: "toggleShortcutList" }] }, { name: t("shortcut.editor"), shortcuts: [{ name: t("shortcut.toggleLeftPanel"), keys: [{ mod: true, key: "B" }], target: "global", action: "toggleLeftPanel" }, { name: t("shortcut.toggleBottomPanel"), keys: [{ mod: true, key: "J" }], target: "global", action: "toggleBottomPanel" }, { name: t("shortcut.toggleRightPanel"), keys: [{ mod: true, key: "U" }], target: "global", action: "toggleRightPanel" }, { name: t("shortcut.toggleAllPanels"), keys: [{ mod: true, key: "." }], target: "global", action: "toggleAllPanels" }, { name: t("shortcut.preview"), keys: [{ mod: true, shift: true, key: "P" }], target: "global", action: "preview" }, { name: t("shortcut.undo"), keys: [{ mod: true, key: "Z" }], target: "global", action: "undo" }, { name: t("shortcut.redo"), keys: [{ mod: true, shift: true, key: "Z" }], target: "global", action: "redo" }, { name: t("shortcut.showGrid"), keys: [{ mod: true }] }] }, { name: t("shortcut.component"), shortcuts: [{ name: t("shortcut.multiSelect"), keys: [{ mod: true, click: true }] }, { name: t("shortcut.selectAll"), keys: [{ mod: true, key: "A" }], target: "editor", action: "selectAllComps" }, { name: t("shortcut.copy"), keys: [{ mod: true, key: "C" }], target: "editor", action: "copyComps" }, { name: t("shortcut.cut"), keys: [{ mod: true, key: "X" }], target: "editor", action: "cutComps" }, { name: t("shortcut.paste"), keys: [{ mod: true, key: "V" }], target: "editor", action: "pasteComps" }, { name: t("shortcut.move"), keys: [{ directionKey: true }] }, { name: t("shortcut.zoom"), keys: [{ mod: true, directionKey: true }] }, { name: t("shortcut.delete"), keys: [{ key: "Delete" }, { key: "Backspace" }], target: "global", action: "deleteComps" }, { name: t("shortcut.deSelect"), keys: [{ key: "Escape" }], target: "editor", action: "deselectComps" }] }, { name: t("shortcut.queryEditor"), shortcuts: [{ name: t("shortcut.excuteQuery"), keys: [{ mod: true, key: "Enter", notFilterInput: true }], target: "global", action: "executeQuery" }] }, { name: t("shortcut.editBox"), shortcuts: [{ name: t("shortcut.formatting"), keys: [{ mod: true, key: "L" }] }, { name: t("shortcut.openInLeftPanel"), keys: [{ mod: true, click: true }] }] }], c = s.mapValues(s.groupBy(r.flatMap((t2) => t2.shortcuts).filter((t2) => t2.target && t2.action), (t2) => t2.target), (t2) => Object.fromEntries(t2.flatMap((t3) => t3.keys.map((o2) => [e(o2), [t3.action, o2]]))));
function n(t2, e2) {
  const s2 = c[e2], r2 = o(t2);
  if (s2.hasOwnProperty(r2)) {
    const [e3, o2] = s2[r2];
    if (o2.notFilterInput || !a(t2))
      return e3;
  }
  return "";
}
export {
  r as a,
  n as g
};
