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AA;MAAA;IAAA,GAAAhE,OAAA;EAAA,CAaL;EAAA,gBA3FYL,uCAAuCA,CAAA;IAAA,OAAAC,IAAA,CAAAqE,KAAA,OAAAjC,SAAA;EAAA;AAAA,GA2FnD","sources":["webpack://smetio/./developement/js/functions/apps/aiagents/showGoogleAdsAiAgentSubscriptionSummary.js"],"sourcesContent":["\r\nexport const showGoogleAdsAiAgentSubscriptionSummary = async (functionParameters = {}) => {\r\n \r\n const { businessName, budget, agentId, country, organisationNumber, attachedBusinessToken, friendlyDescription } = functionParameters;\r\n \r\n\r\n const { setTxtV2 } = (await import(/* webpackPrefetch: true */ \"../../../classes/universal_methods/setTxtV2.js\"));\r\n const { getConfirmationSmartbox } = (await import(/* webpackPrefetch: true */ \"./../../get/getConfirmationSmartbox\"));\r\n const { getAvailableAiAgents, getCurrencySymbol, getTimeIntervalTextMap } = await import(/* webpackPrefetch: true */ \"@schaniag/sharedfunctions\");\r\n\r\n functionParameters.sideMenuItems = window.currentSideMenuItems;\r\n functionParameters.smetioAppUi = window.currentSmetioAppUi;\r\n\r\n\r\n\r\n const timeIntervalTextMap = getTimeIntervalTextMap({});\r\n const aiAgents = getAvailableAiAgents({});\r\n const agent = aiAgents[agentId];\r\n const {label, price, currency, billingInterval, budgetOptions} = agent;\r\n const agentLabel = setTxtV2({ attributes: {}, txt: label, type: \"html\" });\r\n\r\n const averageDaysInAMonth = 30.5;\r\n\r\n const monthlyBudget = budget * averageDaysInAMonth;\r\n let totalMonthlyCost = monthlyBudget + price;\r\n const timeIntervalText = setTxtV2({ attributes: {}, txt: timeIntervalTextMap[billingInterval], type: \"html\" }).toLocaleLowerCase();\r\n totalMonthlyCost = ` ${getCurrencySymbol({ currencyCode: currency })}${totalMonthlyCost} ${timeIntervalText}`;\r\n\r\n const output = `\r\n \r\n
\r\n \r\n

\r\n ${ setTxtV2({ attributes: {}, txt: \"txt1914\", type: \"html\" }).replace(\"[#0190]\", agentLabel) }\r\n

\r\n \r\n

\r\n ${ setTxtV2({ attributes: {}, txt: \"txt1916\", type: \"html\" }).replace(\"[#1234]\", totalMonthlyCost)}: \r\n

\r\n\r\n

${ setTxtV2({ attributes: {}, txt: \"txt1917\", type: \"html\" })}

\r\n\r\n

\r\n ${ setTxtV2({ attributes: {}, txt:\"txt1918\", type: \"html\" })}: \r\n ${getCurrencySymbol({ currencyCode: currency })}${price} ${ setTxtV2({ attributes: {}, txt: timeIntervalTextMap[agent.billingInterval], type: \"html\" }).toLowerCase()}\r\n

\r\n\r\n

\r\n ${ setTxtV2({ attributes: {}, txt:\"txt1911\", type: \"html\" })}: \r\n ${getCurrencySymbol({ currencyCode: budgetOptions.currency })}${budget} ${setTxtV2({ attributes: {}, txt: timeIntervalTextMap[budgetOptions.interval], type: \"html\" }).toLowerCase()} x ${averageDaysInAMonth}\r\n

\r\n\r\n

\r\n ${ setTxtV2({ attributes: {}, txt:\"txt1850\", type: \"html\" })}: \r\n ${totalMonthlyCost}\r\n

\r\n\r\n

\r\n ${ setTxtV2({ attributes: {}, txt: \"txt1768\", type: \"html\" })}\r\n

\r\n\r\n

\r\n ${ businessName } - ${organisationNumber} ${country}\r\n

\r\n \r\n
\r\n `;\r\n\r\n return getConfirmationSmartbox({\r\n title:label,\r\n informationTexts: output,\r\n buttonText: \"txt1774\",\r\n showClickInstruction:false,\r\n showHeading:false,\r\n smartboxName: \"showgoogleAdsAiAgentSubscriptionSmartbox\",\r\n functionDetails: {\r\n functionPath: \"apps/aiagents/authenticatePaymentForAiAgentSubscription\",\r\n functionParameters\r\n }\r\n });\r\n\r\n\r\n\r\n /* \r\n
\r\n ${ setTxtV2({ attributes: {}, txt: \"txt1769\", type: \"html\" })}\r\n
\r\n

\r\n ${ paymentMethod.brand } | **** ${ paymentMethod.last4 } | EXP: ${paymentMethod.exp_month}/${paymentMethod.exp_year}\r\n

\r\n */\r\n\r\n};\r\n"],"names":["showGoogleAdsAiAgentSubscriptionSummary","_ref","_asyncToGenerator","regeneratorRuntime","mark","_callee","functionParameters","businessName","budget","agentId","country","organisationNumber","attachedBusinessToken","friendlyDescription","_yield$import","setTxtV2","_yield$import2","getConfirmationSmartbox","_yield$import3","getAvailableAiAgents","getCurrencySymbol","getTimeIntervalTextMap","timeIntervalTextMap","aiAgents","agent","label","price","currency","billingInterval","budgetOptions","agentLabel","averageDaysInAMonth","monthlyBudget","totalMonthlyCost","timeIntervalText","output","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","sent","sideMenuItems","window","currentSideMenuItems","smetioAppUi","currentSmetioAppUi","attributes","txt","type","toLocaleLowerCase","concat","currencyCode","replace","toLowerCase","interval","abrupt","title","informationTexts","buttonText","showClickInstruction","showHeading","smartboxName","functionDetails","functionPath","stop","apply"],"sourceRoot":""}