cordova.define("cordova-plugin-moodleapp.moodleapp", function(require, exports, module) {
"use strict";(()=>{var o=class{constructor(){this.permissionStatus=s,this.permission=g,this.requestInProgress=!1}switchToSettings(){return new Promise((e,r)=>cordova.exec(e,r,"Diagnostic","switchToSettings"))}requestMicrophoneAuthorization(){return new Promise((e,r)=>{if(cordova.platformId==="ios"){cordova.exec(i=>e(i?s.granted:s.deniedAlways),r,"Diagnostic_Microphone","requestMicrophoneAuthorization");return}this.requestRuntimePermission(g.recordAudio).then(e).catch(r)})}getPermissionsAuthorizationStatus(e){return new Promise((r,i)=>{if(cordova.platformId!=="android"){r({});return}cordova.exec(t=>{for(let u in t)t[u]=this.convertPermissionStatus(t[u]);r(t)},i,"Diagnostic","getPermissionsAuthorizationStatus",[e])})}requestRuntimePermission(e){return new Promise((r,i)=>{if(cordova.platformId!=="android"){r(s.granted);return}this.requestInProgress&&i("A runtime permissions request is already in progress"),this.requestInProgress=!0,cordova.exec(t=>{this.requestInProgress=!1,r(this.convertPermissionStatus(t[e]))},t=>{this.requestInProgress=!1,i(t)},"Diagnostic","requestRuntimePermission",[e])})}convertPermissionStatus(e){for(let r in c){let i=c[r],t=m[r];if(e===i&&t!==void 0)return t}return e}},g={recordAudio:"RECORD_AUDIO"},c={granted:"GRANTED",grantedWhenInUse:"authorized_when_in_use",deniedOnce:"DENIED_ONCE",deniedAlways:"DENIED_ALWAYS",notRequested:"NOT_REQUESTED"},m={notRequested:"not_determined",deniedAlways:"denied_always",restricted:"restricted",granted:"authorized",grantedWhenInUse:"authorized_when_in_use",ephimeral:"ephemeral",provisional:"provisional",limited:"limited"},s={...c,...m};var n=class{async getReferrer(){return new Promise((e,r)=>{cordova.exec(e,r,"InstallReferrer","getReferrer",[])})}};var a=class{async get(e,r){return typeof e=="string"&&(e=[e]),new Promise((i,t)=>{cordova.exec(i,t,"SecureStorage","get",[e,r])})}async store(e,r){for(let i in e){let t=e[i];if(t==null)delete e[i];else if(typeof t!="string")throw new Error(`SecureStorage: Invalid value for ${i}. Expected string, received ${typeof t}`)}await new Promise((i,t)=>{cordova.exec(i,t,"SecureStorage","store",[e,r])})}async delete(e,r){typeof e=="string"&&(e=[e]),await new Promise((i,t)=>{cordova.exec(i,t,"SecureStorage","delete",[e,r])})}async deleteCollection(e){await new Promise((r,i)=>{cordova.exec(r,i,"SecureStorage","deleteCollection",[e])})}};var l={secureStorage:new a,installReferrer:new n,diagnostic:new o};module.exports=l;})();

});
