function createPermissionDialog(denyText, allowText, dialogText, onAllowClicked, onDenyClicked) {
  var buttonsContainer;
  var denyButton;
  var acceptButton;
  buttonsContainer = document.createElement('div');
  buttonsContainer.classList.add(DIALOG_BUTTONS_CONTAINER_CLASS);

  // Buttons
  denyButton = document.createElement('button');
  denyButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_DENY_BUTTON_CLASS);
  denyButton.setAttribute(_constants_index_js__WEBPACK_IMPORTED_MODULE_1__.AFRAME_INJECTED, '');
  denyButton.innerHTML = denyText;
  buttonsContainer.appendChild(denyButton);
  acceptButton = document.createElement('button');
  acceptButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_ALLOW_BUTTON_CLASS);
  acceptButton.setAttribute(_constants_index_js__WEBPACK_IMPORTED_MODULE_1__.AFRAME_INJECTED, '');
  acceptButton.innerHTML = allowText;
  buttonsContainer.appendChild(acceptButton);

  // Ask for sensor events to be used
  acceptButton.addEventListener('click', function (evt) {
    evt.stopPropagation();
    onAllowClicked();
  });
  denyButton.addEventListener('click', function (evt) {
    evt.stopPropagation();
    onDenyClicked();
  });
  return createDialog(dialogText, buttonsContainer);
}
Create a modal dialog that request users permission to access the Device Motion API.

@param {string} denyText
@param {string} allowText
@param {string} dialogText
@param {function} onAllowClicked - click event handler
@param {function} onDenyClicked - click event handler

@returns {Element} Wrapper <div>.