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C3DK,EAAQE,YAAYF,EAAQE,YAAYkB,GAAqBE,QAAQC,UAAU5B,IAAMyB,IA0BzFD,CAF4B,mDACXf,EAAQ,MAMjCqB,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAazB,QAAO0B,EAAAA,EAAA,GACpBF,OAAOC,aAAazB,SAAW,IAC/BD,EAAQC,SAGXwB,OAAOC,aAAaxB,YAAWyB,EAAAA,EAAA,GAC5BF,OAAOC,aAAaxB,aAAe,IACnCF,EAAQE,iCCzEnB0B,EAAOC,QAAU9B,2BCAjB6B,EAAOC,QAAUC","sources":["webpack://ahi-ecommerce/./src/actions/get-is-request-assistance-product.action.ts?3616","webpack://ahi-ecommerce/./src/themes/ahi/ahi.tsx?c832","webpack://ahi-ecommerce/./lib/ahi/module-registration.js?73d8","webpack://ahi-ecommerce/external var \"React\"?0d3b","webpack://ahi-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getSelectedProductIdFromActionInput } from '@msdyn365-commerce-modules/retail-actions';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getISRequestAssitanceProductActionAsync } from './DataActionExtension.g';\nimport { IRequestAssistanceIsProduct } from './DataServiceEntities.g';\n\n/**\n * GetIsRequestAssistanceProduct Input Action\n */\nexport class GetIsRequestAssistanceProductInput implements Msdyn365.IActionInput {\n // TODO: Construct the input needed to run the action\n public productId: number;\n constructor(productId: number) {\n this.productId = productId;\n }\n\n // TODO: Determine if the results of this get action should cache the results and if so provide\n // a cache object type and an appropriate cache key\n public getCacheKey = () => `GetIsRequestAssistanceProduct-${this.productId}`;\n public getCacheObjectType = () => 'IRequestAssistanceIsProduct';\n public dataCacheType = (): Msdyn365.CacheType => 'application';\n}\n\n// TODO: Create a data model here or import one to capture the response of the action\nexport interface IGetIsRequestAssistanceProductData {\n text: string;\n}\n\n/**\n * TODO: Use this function to create the input required to make the action call\n */\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\n const productId = getSelectedProductIdFromActionInput(args);\n if (productId) {\n return new GetIsRequestAssistanceProductInput(+productId);\n }\n throw new Error('Unable to create GetIsRequestAssistanceProductInput, no productId found on module config or query');\n};\n\n/**\n * TODO: Use this function to call your action and process the results as needed\n */\nfunction action(input: GetIsRequestAssistanceProductInput, ctx: Msdyn365.IActionContext): Promise {\n // const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\n\n // TODO: Uncomment the below line to get the value from a service\n const response = getISRequestAssitanceProductActionAsync({ callerContext: ctx }, { idColEntry: `${input.productId}` }, input.productId);\n // console.log('ProductId', input.productId);\n // console.log(response);\n\n return response;\n}\n\nexport default Msdyn365.createObservableDataAction({\n action: >action,\n // TODO: Give your data action a unique id\n id: 'GetIsRequestAssistanceProduct',\n input: createInput\n // TODO: Uncomment the below line if this is a meant to be a batched data action\n // isBatched: true\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n// TODO: Current build require at least one tsx file\nexport default () =>
;\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['ahi'] = {\n c: () => require('partner/themes/ahi/ahi.tsx'),\n $type: 'themeModule',\n da: [{name:'isRequestAssistanceProduct', path:'actions/get-is-request-assistance-product.action', moduleName: 'buybox',runOn: 0}],\n definitionExtensions: ['active-image','b2b-requests-status','business-organization-list','buybox','cart-icon','cart','content-block','header','image-list','interactive-feature-collection','navigation-menu','order-template-list','promo-banner','quickview','ratings-histogram','reviews-list','search-result-container','search','store-selector','text-block','write-review'],\n iNM: false,\n ns: '__local__',\n n: 'ahi',\n p: '__local__',\n \n pdp: '',\n \n themeSettings: 'ahi.theme.settings.json',\n md: 'src/themes/ahi'\n });\n \n\n {\n const sanitizedActionPath = 'actions/get-is-request-assistance-product.action';\n let dataAction = require('partner/actions/get-is-request-assistance-product.action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["GetIsRequestAssistanceProductInput","constructor","productId","getCacheKey","this","getCacheObjectType","dataCacheType","Msdyn365","action","input","ctx","getISRequestAssitanceProductActionAsync","callerContext","idColEntry","id","args","getSelectedProductIdFromActionInput","Error","React","binding","modules","dataActions","c","require","$type","da","name","path","moduleName","runOn","definitionExtensions","iNM","ns","n","p","pdp","themeSettings","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","window","__bindings__","_objectSpread","module","exports","ReactDOM"],"sourceRoot":""}