import { useId as W } from "../../utils/dist/module.es.js";
import { useLongPress as q } from "../../interactions/dist/module.es.js";
import { useOverlayTrigger as Q } from "../../overlays/dist/module.es.js";
import { useLocalizedStringFormatter as X } from "../../i18n/dist/real-module.es.js";
function Y(r) {
  return r && r.__esModule ? r.default : r;
}
var i = {}, p = {};
p = {
  longPressMessage: "\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"
};
var g = {};
g = {
  longPressMessage: "\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"
};
var u = {};
u = {
  longPressMessage: "Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"
};
var c = {};
c = {
  longPressMessage: "Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"
};
var d = {};
d = {
  longPressMessage: "Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"
};
var $ = {};
$ = {
  longPressMessage: "\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"
};
var b = {};
b = {
  longPressMessage: "Long press or press Alt + ArrowDown to open menu"
};
var f = {};
f = {
  longPressMessage: "Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"
};
var P = {};
P = {
  longPressMessage: "Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"
};
var v = {};
v = {
  longPressMessage: "Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"
};
var m = {};
m = {
  longPressMessage: "Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."
};
var A = {};
A = {
  longPressMessage: "\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"
};
var x = {};
x = {
  longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"
};
var k = {};
k = {
  longPressMessage: "Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"
};
var y = {};
y = {
  longPressMessage: "Premere a lungo o premere Alt + Freccia gi\xF9 per aprire il menu"
};
var M = {};
M = {
  longPressMessage: "\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"
};
var h = {};
h = {
  longPressMessage: "\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"
};
var D = {};
D = {
  longPressMessage: "Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."
};
var z = {};
z = {
  longPressMessage: "Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"
};
var j = {};
j = {
  longPressMessage: "Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"
};
var w = {};
w = {
  longPressMessage: "Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"
};
var S = {};
S = {
  longPressMessage: "Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"
};
var L = {};
L = {
  longPressMessage: "Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"
};
var T = {};
T = {
  longPressMessage: "Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"
};
var N = {};
N = {
  longPressMessage: "Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"
};
var R = {};
R = {
  longPressMessage: "\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"
};
var E = {};
E = {
  longPressMessage: "Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"
};
var F = {};
F = {
  longPressMessage: "Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"
};
var I = {};
I = {
  longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"
};
var K = {};
K = {
  longPressMessage: "H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"
};
var U = {};
U = {
  longPressMessage: "Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"
};
var O = {};
O = {
  longPressMessage: "\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"
};
var B = {};
B = {
  longPressMessage: "\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"
};
var C = {};
C = {
  longPressMessage: "\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"
};
i = {
  "ar-AE": p,
  "bg-BG": g,
  "cs-CZ": u,
  "da-DK": c,
  "de-DE": d,
  "el-GR": $,
  "en-US": b,
  "es-ES": f,
  "et-EE": P,
  "fi-FI": v,
  "fr-FR": m,
  "he-IL": A,
  "hr-HR": x,
  "hu-HU": k,
  "it-IT": y,
  "ja-JP": M,
  "ko-KR": h,
  "lt-LT": D,
  "lv-LV": z,
  "nb-NO": j,
  "nl-NL": w,
  "pl-PL": S,
  "pt-BR": L,
  "pt-PT": T,
  "ro-RO": N,
  "ru-RU": R,
  "sk-SK": E,
  "sl-SI": F,
  "sr-SP": I,
  "sv-SE": K,
  "tr-TR": U,
  "uk-UA": O,
  "zh-CN": B,
  "zh-TW": C
};
function oe(r, s, t) {
  let { type: H = "menu", isDisabled: a, trigger: o = "press" } = r, n = W(), { triggerProps: l, overlayProps: G } = Q({
    type: H
  }, s, t), Z = (e) => {
    if (!a && !(o === "longPress" && !e.altKey) && t && t.current)
      switch (e.key) {
        case "Enter":
        case " ":
          if (o === "longPress")
            return;
        case "ArrowDown":
          "continuePropagation" in e || e.stopPropagation(), e.preventDefault(), s.toggle("first");
          break;
        case "ArrowUp":
          "continuePropagation" in e || e.stopPropagation(), e.preventDefault(), s.toggle("last");
          break;
      }
  }, _ = X(/* @__PURE__ */ Y(i)), { longPressProps: J } = q({
    isDisabled: a || o !== "longPress",
    accessibilityDescription: _.format("longPressMessage"),
    onLongPressStart() {
      s.close();
    },
    onLongPress() {
      s.open("first");
    }
  }), V = {
    onPressStart(e) {
      e.pointerType !== "touch" && e.pointerType !== "keyboard" && !a && s.toggle(e.pointerType === "virtual" ? "first" : null);
    },
    onPress(e) {
      e.pointerType === "touch" && !a && s.toggle();
    }
  };
  return delete l.onPress, {
    menuTriggerProps: {
      ...l,
      ...o === "press" ? V : J,
      id: n,
      onKeyDown: Z
    },
    menuProps: {
      ...G,
      "aria-labelledby": n,
      autoFocus: s.focusStrategy || !0,
      onClose: s.close
    }
  };
}
export {
  oe as useMenuTrigger
};
//# sourceMappingURL=module.es.js.map
