const getButtonsListFromConfig = (toolbarConfig, buttonsType) => {
  if (!("getButtons" in toolbarConfig) || toolbarConfig.getButtons === void 0) {
    return [];
  }
  const buttonsPerType = toolbarConfig.getButtons();
  if (buttonsType === "desktop") {
    return buttonsPerType.desktop ?? [];
  }
  return (isIOS() ? buttonsPerType.mobile?.ios : buttonsPerType.mobile?.android) ?? [];
};
const isIOS = () => {
  return typeof navigator !== "undefined" && (["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
    navigator.platform
  ) || // iPad on iOS 13 detection
  navigator.userAgent.includes("Mac") && "ontouchend" in document);
};
export {
  getButtonsListFromConfig
};
//# sourceMappingURL=get-buttons-list-from-config.js.map
