{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/E70p2urSxves6ZMtiSYz/j159rUw9ane3vPkgOj3M/Select_item.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const itemDetailsMap={mba:{item_name:\"thePowermba\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:999},\"MBa+DM\":{item_name:\"thePowermba + Digital Marketing\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:1499},dm:{item_name:\"Digital Marketing\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:999},\"mba+dm+sales\":{item_name:\"thePowermba + Digital Marketing + Power Sales\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:1799},sales:{item_name:\"PowerSales\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:999},\"mba+sales\":{item_name:\"thePowermba + Power Sales\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:1499},\"dm+sales\":{item_name:\"Digital Marketing + Power Sales\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:1499},\"data for business\":{item_name:\"Data for Business\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:999},FINANCE:{item_name:\"Power Finance\",item_brand:\"ThePowerMBA\",item_category:\"Programa\",price:999}};const useStore=createStore({itemSelected:null});export function withSelectItem(Component){return props=>{const[_,setStore]=useStore();const handleClick=itemKey=>{const itemDetails=itemDetailsMap[itemKey];if(itemDetails){window.dataLayer?.push({ecommerce:null});window.dataLayer?.push({event:\"select_item\",ecommerce:{items:[{item_name:itemDetails.item_name,affiliation:itemDetails.item_brand,price:itemDetails.price,item_category:itemDetails.item_category}]}});console.log(\"\u2705 select_item event pushed for:\",itemDetails);setStore({itemSelected:itemDetails});}else{console.warn(`\u26A0\uFE0F Clave \"${itemKey}\" no encontrada en itemDetailsMap. Las v\\xe1lidas son:`,Object.keys(itemDetailsMap));}};return /*#__PURE__*/_jsx(Component,{...props,onClick:e=>{const itemKey=e.currentTarget.getAttribute(\"data-framer-name\")||e.currentTarget.getAttribute(\"name\");console.log(\"\uD83D\uDDB1 Item Name clicked:\",itemKey);if(itemKey)handleClick(itemKey);}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSelectItem\":{\"type\":\"reactHoc\",\"name\":\"withSelectItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Select_item.map"],
  "mappings": "2HAAgH,IAAMA,EAAe,CAAC,IAAI,CAAC,UAAU,cAAc,WAAW,cAAc,cAAc,WAAW,MAAM,GAAG,EAAE,SAAS,CAAC,UAAU,kCAAkC,WAAW,cAAc,cAAc,WAAW,MAAM,IAAI,EAAE,GAAG,CAAC,UAAU,oBAAoB,WAAW,cAAc,cAAc,WAAW,MAAM,GAAG,EAAE,eAAe,CAAC,UAAU,gDAAgD,WAAW,qBAAqB,cAAc,WAAW,MAAM,IAAI,EAAE,MAAM,CAAC,UAAU,aAAa,WAAW,cAAc,cAAc,WAAW,MAAM,GAAG,EAAE,YAAY,CAAC,UAAU,4BAA4B,WAAW,cAAc,cAAc,WAAW,MAAM,IAAI,EAAE,WAAW,CAAC,UAAU,kCAAkC,WAAW,cAAc,cAAc,WAAW,MAAM,IAAI,EAAE,oBAAoB,CAAC,UAAU,oBAAoB,WAAW,cAAc,cAAc,WAAW,MAAM,GAAG,EAAE,QAAQ,CAAC,UAAU,gBAAgB,WAAW,cAAc,cAAc,WAAW,MAAM,GAAG,CAAC,EAAQC,EAASC,EAAY,CAAC,aAAa,IAAI,CAAC,EAAS,SAASC,EAAeC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAEC,CAAQ,EAAEN,EAAS,EAAQO,EAAYC,GAAS,CAAC,IAAMC,EAAYV,EAAeS,CAAO,EAAKC,GAAaC,EAAO,WAAW,KAAK,CAAC,UAAU,IAAI,CAAC,EAAEA,EAAO,WAAW,KAAK,CAAC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