{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/NVBqt2PSfdVIErz7jddF/oVkHPF5Y2IaxW5JsOLzy/Select_item_latam.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Definici\u00F3n del mapa de detalles normalizado\nconst itemDetailsMap={mba:{item_name:\"ThePowermba Latam\",item_brand:\"ThePowermba Latam\",item_category:\"Programa\",price:695},\"mba + digital marketing\":{item_name:\"ThePowermba + Digital Marketing Latam\",item_brand:\"ThePowermba Latam\",item_category:\"Programa\",price:1099},\"rock the code\":{item_name:\"Rock the Code Latam\",item_brand:\"ThePowermba Latam\",item_category:\"Programa\",price:0},\"data & analytics\":{item_name:\"Data & Analytics Latam\",item_brand:\"ThePowermba Latam\",item_category:\"Programa\",price:0},\"power ia\":{item_name:\"Power IA Latam\",item_brand:\"ThePowermba Latam\",item_category:\"Programa\",price:799},\"power bi\":{item_name:\"Power BI Latam\",item_brand:\"ThePowerMBa Latam\",item_category:\"Programa\",price:599},\"marketinf fundamentals\":{item_name:\"Digital Marketing Latam\",item_brand:\"ThePowerMBA Latam\",item_category:\"Programa\",price:695},\"power sales\":{item_name:\"PowerSales\",item_brand:\"ThePowerMBA Latam\",item_category:\"Programa\",price:695},\"mba + ventas\":{item_name:\"ThePowerMBA + PowerSales\",item_brand:\"ThePowerMBA Latam\",item_category:\"Programa\",price:1099},\"mba + ventas + marketing digital\":{item_name:\"ThePowerMBA + PowerSales + Marketing Digital\",item_brand:\"ThePowerMBA Latam\",item_category:\"Programa\",price:1499},\"digital marketing + power sales\":{item_name:\"PowerSales + Marketing Digital\",item_brand:\"ThePowerMBA Latam\",item_category:\"Programa\",price:1099}};// Crear un store para manejar el estado\nconst useStore=createStore({itemSelected:null});// HOC para manejar eventos select_item\nexport function withSelectItem(Component){return props=>{const[store,setStore]=useStore();const handleClick=itemKey=>{// Limpiar el objeto ecommerce anterior\nwindow.dataLayer.push({ecommerce:null});// Normalizar itemKey: convertir a min\u00FAsculas y eliminar espacios extra\nconst normalizedItemKey=itemKey.toLowerCase().trim();// Obtener los detalles del item desde el mapa\nconst itemDetails=itemDetailsMap[normalizedItemKey];if(itemDetails){// Empujar el evento select_item al dataLayer\nwindow.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(\"select_item event pushed for:\",itemDetails);setStore({itemSelected:itemDetails});}else{console.error(\"Item details not found for key:\",itemKey);}};return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const itemKey=(props[\"data-framer-name\"]||props[\"name\"]).toLowerCase().trim();console.log(\"Item Name clicked:\",itemKey);handleClick(itemKey);}});};}// Componente bot\u00F3n\nconst CtaButton=props=>{return /*#__PURE__*/_jsx(\"button\",{...props,\"data-framer-name\":props[\"data-framer-name\"],name:props[\"name\"],children:props.children});};// Crear botones mejorados con HOC\nconst EnhancedCtaButton=withSelectItem(CtaButton);// P\u00E1gina principal\nconst Home=()=>{return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"mba\",name:\"mba\",children:\"MBA\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"mba + digital marketing\",name:\"mba + digital marketing\",children:\"MBA + Digital Marketing\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"rock the code\",name:\"rock the code\",children:\"Rock the Code\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"data & analytics\",name:\"data & analytics\",children:\"Data & Analytics\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"power ia\",name:\"power ia\",children:\"Power IA\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"power bi\",name:\"power bi\",children:\"Power Bi\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"marketinf fundamentals\",name:\"marketinf fundamentals\",children:\"Marketing Fundamentals\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"power sales\",name:\"power sales\",children:\"Power Sales\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"mba + ventas\",name:\"mba + ventas\",children:\"MBA + Ventas\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"mba + ventas + marketing digital\",name:\"mba + ventas + marketing digital\",children:\"MBA + Ventas + Marketing Digital\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{\"data-framer-name\":\"digital marketing + power sales\",name:\"digital marketing + power sales\",children:\"Digital Marketing + Power Sales\"})]});};export default Home;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSelectItem\":{\"type\":\"reactHoc\",\"name\":\"withSelectItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Select_item_latam.map"],
  "mappings": "2HACA,IAAMA,EAAe,CAAC,IAAI,CAAC,UAAU,oBAAoB,WAAW,oBAAoB,cAAc,WAAW,MAAM,GAAG,EAAE,0BAA0B,CAAC,UAAU,wCAAwC,WAAW,oBAAoB,cAAc,WAAW,MAAM,IAAI,EAAE,gBAAgB,CAAC,UAAU,sBAAsB,WAAW,oBAAoB,cAAc,WAAW,MAAM,CAAC,EAAE,mBAAmB,CAAC,UAAU,yBAAyB,WAAW,oBAAoB,cAAc,WAAW,MAAM,CAAC,EAAE,WAAW,CAAC,UAAU,iBAAiB,WAAW,oBAAoB,cAAc,WAAW,MAAM,GAAG,EAAE,WAAW,CAAC,UAAU,iBAAiB,WAAW,oBAAoB,cAAc,WAAW,MAAM,GAAG,EAAE,yBAAyB,CAAC,UAAU,0BAA0B,WAAW,oBAAoB,cAAc,WAAW,MAAM,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,EACtJU,EAAkBZ,EAAeW,CAAS",
  "names": ["itemDetailsMap", "useStore", "createStore", "withSelectItem", "Component", "props", "store", "setStore", "handleClick", "itemKey", "window", "normalizedItemKey", "itemDetails", "p", "CtaButton", "EnhancedCtaButton"]
}
