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;IAAA,GAAAnB,OAAA;EAAA,CA6FjD;EAAA,gBAzGYL,cAAcA,CAAA;IAAA,OAAAC,IAAA,CAAAwB,KAAA,OAAAX,SAAA;EAAA;AAAA,GAyG1B","sources":["webpack://smetio/./developement/js/functions/apps/skills/createNewSkill.js"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\nexport const createNewSkill = async (functionParameters = {}) => {\r\n\r\n let { smartboxStorageName = \"creatSkillsSmartboxes\", modelPath = \"loggedInUser/skills/treatmentsSkillsModel\"} = functionParameters;\r\n \r\n\r\n const { retrieveModel } = (await import(/* webpackPrefetch: true */ \"../general/retrieveModel\"));\r\n\r\n functionParameters[\"smartboxStorageName\"] = smartboxStorageName;\r\n functionParameters[\"modelPath\"] = modelPath;\r\n functionParameters[\"submissionFuncPath\"] = \"apps/skills/updatePartsOfSkills\";\r\n functionParameters[\"sideMenuToUse\"] = \"skills\";\r\n \r\n return await retrieveModel(functionParameters);\r\n\r\n\r\n // const smartboxStorageName = \"creatSkillsSmartboxes\";\r\n\r\n // if (smartboxStorageName in window) {\r\n\r\n // const { idOfcurrentlyVisibleSmartBox } = window[smartboxStorageName];\r\n // window[smartboxStorageName][\"smartboxes\"][idOfcurrentlyVisibleSmartBox].animate({ animation: \"shakeX\" });\r\n\r\n // return false;\r\n // };\r\n\r\n\r\n // const { token, copyApiEndPoint, isCopying, treatmentName, submitText, instructionTitle, } = functionParameters;\r\n\r\n // const appClass = window.smetioApp;\r\n\r\n // const apiEndPoint = window.apiEndPoint;\r\n // const language = window.userLanguage;\r\n\r\n // const axios = (await import(/* webpackPrefetch: true */ \"axios\")).default;\r\n // // const generateId = (await import(/* webpackPrefetch: true */ `../../../classes/universal_methods/generateId.js`)).generateId;\r\n // const displayAndStoreSmartboxWithPreloader = (await import(/* webpackPrefetch: true */ \"../../display/displayAndStoreSmartboxWithPreloader.js\")).displayAndStoreSmartboxWithPreloader;\r\n\r\n // const smartBoxTitle = isCopying == true ? \"txt1331\" : treatmentName || \"txt1331\";\r\n // const { preloader, smetioSmartbox, backBtnIsClicked } = await displayAndStoreSmartboxWithPreloader({ title: smartBoxTitle, smartboxStorageName });\r\n\r\n // const url = copyApiEndPoint ? copyApiEndPoint : `${apiEndPoint}/apps/${appClass.appUserInterface}/skills/model/${language}`;\r\n\r\n // const modelPath = \"loggedInUser/skills/treatmentsSkillsModel\";\r\n\r\n // const res = await axios.get(url, { params: { token, modelPath, isCopying } }).then(async (response) => {\r\n\r\n // let model = response.data;\r\n\r\n // if (model.error) {\r\n // backBtnIsClicked();\r\n // return window.smetioVisitor.showNotification({ type: \"danger\", body: [{ message: model.msg }] });\r\n // };\r\n\r\n // const { nextStep, modelPath, instructionTitle, instructionSubtitle, token, treatmentName, updateCompleted } = model;\r\n // model = model.model;\r\n\r\n\r\n // const setTxtV2 = (await import(/* webpackPrefetch: true */ \"./../../../classes/universal_methods/setTxtV2.js\")).setTxtV2;\r\n\r\n // const newVersionOfConvertModelToInputs = (await import(/* webpackPrefetch: true */ \"./../../../classes/universal_methods/newVersionOfConvertModelToInputs.js\")).newVersionOfConvertModelToInputs;\r\n\r\n // const markedFieldText = setTxtV2({ attributes: {}, txt: \"txt56\", type: \"html\" });\r\n\r\n // const url = `${apiEndPoint}/apps/${appClass.appUserInterface}/skills/create/${language}`;\r\n\r\n // const confirmationInput = await newVersionOfConvertModelToInputs({\r\n // model,\r\n // withSubmitButton: true,\r\n // withFullContainerDiv: true,\r\n // submitText: \"txt38\",\r\n // doNotShowInstruction: true,\r\n // instructionTitle: \"\",\r\n // instructionSubtitle: \"\",\r\n // submissionFunctionDetails: {\r\n // functionPath: \"apps/treatments/bodyPartsOptionsModel\",\r\n // functionParameters: { appClass, preloader, smetioSmartbox, token, smartboxStorageName, treatmentName, isCopying, url, modelPath, sideMenuToUse:\"skills\" },\r\n // // addToSubmissionData: isCopying == true ? {} : {token}\r\n // addToSubmissionData: { token, isCopying, treatmentName }\r\n // },\r\n // // showBackBtn:true,\r\n // // onBackBtnClicked: ()=>{\r\n // // window[\"whatBodyPartModelSmartbox\"].hide();\r\n // // window[\"whoIsTreatmentForModelSmartbox\"].show();\r\n // // }, \r\n\r\n // });\r\n\r\n // const newPreloaderDisplay = preloader.render();\r\n\r\n // const content = `\r\n // ${newPreloaderDisplay}\r\n // ${confirmationInput}\r\n // `;\r\n // preloader.hide();\r\n\r\n // smetioSmartbox.updateContent(content);\r\n\r\n // }).catch((error) => {\r\n\r\n // console.log(error);\r\n // return window.smetioVisitor.showNotification({ type: \"danger\", body: [{ message: \"txt423\" }] });\r\n\r\n // }).finally(() => {\r\n // preloader.hide();\r\n // });\r\n};\r\n"],"names":["createNewSkill","_ref","_asyncToGenerator","regeneratorRuntime","mark","_callee","functionParameters","_functionParameters$s","smartboxStorageName","_functionParameters$m","modelPath","_yield$import","retrieveModel","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","sent","abrupt","stop","apply"],"sourceRoot":""}