Liferay.Loader.define("layout-content-page-editor-web@2.0.169/page_editor/app/actions/togglePermission", ['module', 'exports', 'require', './types'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = togglePermission;

    var _types = require("./types");

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */

    /**
     * @param {import('../../types/ActionKeys').ACTION_KEYS} key
     * @param {boolean} [value]
     */
    function togglePermission(key) {
      var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
      var action = {
        key: key,
        type: _types.TOGGLE_PERMISSION
      };

      if (typeof value === 'boolean') {
        action.forceNewValue = value;
      }

      return action;
    }
    //# sourceMappingURL=togglePermission.js.map
  }
});
//# sourceMappingURL=togglePermission.js.map