{"version":3,"file":"settings.min.js","sources":["../../src/util/settings.js"],"sourcesContent":["/* eslint no-var: \"error\" */\n/* eslint-env es6*/\n\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\n\n// Prepare default values\nexport const settings = {\n \"hivizdropslots\" : false,\n \"toolboxleft\" : false,\n \"toolboxcoursesonly\" : false,\n \"enablebadges\" : false,\n \"badges_allowcoursebadges\" : false,\n \"showprevnextarrows\" : false,\n \"enableplansharing\" : false,\n};\n\n/**\n * Refresh settings from server\n * @returns {Object} The settings object\n */\nexport function refreshsettings() {\n call([{\n methodname: 'local_treestudyplan_getsettings',\n args: {}\n }])[0].then((response) => {\n for ( const key in response) {\n settings[key] = response[key];\n }\n }).catch(notification.exception);\n}\n\n// Preload settings.\nrefreshsettings();"],"names":["settings","refreshsettings","methodname","args","then","response","key","catch","notification","exception"],"mappings":"2UAOaA,SAAW,iBACD,eACH,sBACO,gBACN,4BACY,sBACN,qBACD,YAOVC,iCACP,CAAC,CACFC,WAAY,kCACZC,KAAM,MACN,GAAGC,MAAMC,eACH,MAAMC,OAAOD,SACfL,SAASM,KAAOD,SAASC,QAE9BC,MAAMC,sBAAaC,sCAI1BR"}