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B;YAClEA,kBAAkB,CAAC,eAAe,CAAC,GAAG,OAAO;YAC7CA,kBAAkB,CAAC,qBAAqB,CAAC,GAAGO,mBAAmB;YAC/D;YAAAQ,QAAA,CAAAE,IAAA;YAAA,OAEaP,aAAa,CAACV,kBAAkB,CAAC;UAAA;YAAA,OAAAe,QAAA,CAAAQ,MAAA,WAAAR,QAAA,CAAAK,IAAA;UAAA;UAAA;YAAA,OAAAL,QAAA,CAAAS,IAAA;QAAA;MAAA;IAAA,GAAAzB,OAAA;EAAA,CAyFjD;EAAA,gBAzGYL,oBAAoBA,CAAA;IAAA,OAAAC,IAAA,CAAA8B,KAAA,OAAAb,SAAA;EAAA;AAAA,GAyGhC","sources":["webpack://smetio/./developement/js/functions/apps/texts/retrieveModelForText.js"],"sourcesContent":["export const retrieveModelForText = async ( functionParameters = {} ) => {\r\n \r\n const { token, copyApiEndPoint, isCopying, title, submitText, instructionTitle} = functionParameters;\r\n let {smartboxStorageName, modelPath, url } = functionParameters;\r\n\r\n smartboxStorageName = smartboxStorageName || \"retrieveModelForTextSmartbox\";\r\n\r\n const retrieveModel = (await import(/* webpackPrefetch: true */ `../general/retrieveModel`) ).retrieveModel;\r\n\r\n console.log(\"functionParameters is \", functionParameters);\r\n\r\n functionParameters[\"submissionFuncPath\"] = \"apps/texts/updateText\";\r\n functionParameters[\"sideMenuToUse\"] = \"texts\";\r\n functionParameters[\"smartboxStorageName\"] = smartboxStorageName;\r\n // functionParameters[\"urlDestination\"] = functionParameters[\"urlDestination\"] || \"update\";\r\n\r\n return await retrieveModel(functionParameters);\r\n\r\n // if(!modelPath) throw \"** ERROR: Smetio said model path must be provided **\";\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 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 = title || \"\";\r\n // const { preloader, smetioSmartbox, backBtnIsClicked } = await displayAndStoreSmartboxWithPreloader({ title: smartBoxTitle, smartboxStorageName });\r\n\r\n // url = url || `${apiEndPoint}/apps/${appClass.appUserInterface }/website/model/${language}`;\r\n\r\n // // modelPath = \"loggedInUser/treatments/whoIsTreatmentForModel\"\r\n\r\n // const res = await axios.get(url, {params:{token, modelPath } }).then(async (response) => {\r\n\r\n // let model = response.data;\r\n\r\n // // if (model.error) return window.smetioVisitor.showNotification({ type: \"danger\", body: [{ message: model.msg }] });\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, submitText, 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 confirmationInput = await newVersionOfConvertModelToInputs({\r\n // model, \r\n // withSubmitButton: true, \r\n // withFullContainerDiv: true,\r\n // submitText: submitText || \"txt38\",\r\n // doNotShowInstruction: true,\r\n // instructionTitle,\r\n // instructionSubtitle,\r\n // submissionFunctionDetails: {\r\n // functionPath: \"apps/website/updatePartsOfWebsite\",\r\n // functionParameters:{appClass, preloader, smetioSmartbox, token, smartboxStorageName, isCopying, title},\r\n // // addToSubmissionData: isCopying == true ? {} : {token}\r\n // addToSubmissionData: {token, isCopying, modelPath }\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};"],"names":["retrieveModelForText","_ref","_asyncToGenerator","regeneratorRuntime","mark","_callee","functionParameters","token","copyApiEndPoint","isCopying","title","submitText","instructionTitle","smartboxStorageName","modelPath","url","retrieveModel","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","sent","console","log","abrupt","stop","apply"],"sourceRoot":""}