{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/qcv1vBkwy33B1avThW9m/qoFgEnoLBUpqi5bmRhJ3/Select_item_global.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\";const itemDetailsMap={mba:{item_name:\"ThePowerMBA Global\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:999},\"mba + digital marketing\":{item_name:\"MBA + Digital Marketing\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:1499},\"rock the code\":{item_name:\"Rock the Code Global\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:0},ia:{item_name:\"Power IA Global\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:899},\"the power digital marketing\":{item_name:\"ThePower Digital Marketing Global\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:999},\"mba + ps + dm\":{item_name:\"ThePowerMBA + PowerSales + Digital Marketing\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:1999},\"power sales\":{item_name:\"PowerSales\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:999},\"mba + ventas\":{item_name:\"ThePowerMBA + PowerSales\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:1499},\"Digital Marketing + Power Sales\":{item_name:\"PowerSales + Digital Marketing\",item_brand:\"ThePowerMBA Global\",item_category:\"Programa\",price:1499}};// Crea un store para manejar el estado (si es necesario)\nconst useStore=createStore({itemSelected:null});export 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:\",normalizedItemKey);}};return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{const itemKey=props[\"data-framer-name\"]||props[\"name\"]// Obtener el data-framer-name o name\n;console.log(\"Item Name clicked:\",itemKey);handleClick(itemKey)// Normalizado en la funci\u00F3n handleClick\n;}});};}const CtaButton=props=>{return /*#__PURE__*/_jsx(\"button\",{...props,\"data-framer-name\":props[\"data-framer-name\"],name:props[\"name\"],children:props.children});};// Aqu\u00ED puedes agregar los botones con sus nombres correspondientes\nconst EnhancedCtaButton1=withSelectItem(CtaButton);const EnhancedCtaButton2=withSelectItem(CtaButton);const EnhancedCtaButton3=withSelectItem(CtaButton);const EnhancedCtaButton4=withSelectItem(CtaButton);const EnhancedCtaButton5=withSelectItem(CtaButton);const EnhancedCtaButton6=withSelectItem(CtaButton);const EnhancedCtaButton7=withSelectItem(CtaButton);const EnhancedCtaButton8=withSelectItem(CtaButton);const EnhancedCtaButton9=withSelectItem(CtaButton);const Home=()=>{return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(EnhancedCtaButton1,{\"data-framer-name\":\"mba\",name:\"mba\",children:\"MBA\"}),/*#__PURE__*/_jsx(EnhancedCtaButton2,{\"data-framer-name\":\"MBA + Digital Marketing\",name:\"MBA + Digital Marketing\",children:\"MBA + Digital Marketing\"}),/*#__PURE__*/_jsx(EnhancedCtaButton3,{\"data-framer-name\":\"rock the code\",name:\"rock the code\",children:\"Rock the Code\"}),/*#__PURE__*/_jsx(EnhancedCtaButton4,{\"data-framer-name\":\"ia\",name:\"ia\",children:\"IA\"}),/*#__PURE__*/_jsx(EnhancedCtaButton5,{\"data-framer-name\":\"the power digital marketing\",name:\"the power digital marketing\",children:\"the power digital marketing\"}),/*#__PURE__*/_jsx(EnhancedCtaButton6,{\"data-framer-name\":\"MBA + PS + DM\",name:\"MBA + PS + DM\",children:\"MBA + PS + DM\"}),/*#__PURE__*/_jsx(EnhancedCtaButton7,{\"data-framer-name\":\"Power Sales\",name:\"Power Sales\",children:\"Power Sales\"}),/*#__PURE__*/_jsx(EnhancedCtaButton8,{\"data-framer-name\":\"MBA + Ventas\",name:\"MBA + Ventas\",children:\"MBA + Ventas\"}),/*#__PURE__*/_jsx(EnhancedCtaButton9,{\"data-framer-name\":\"Digital Marketing + Power Sales\",name:\"Digital Marketing + Power Sales\",children:\"Digital Marketing + Power Sales\"})]});};export default Home;\nexport const __FramerMetadata__ = {\"exports\":{\"withSelectItem\":{\"type\":\"reactHoc\",\"name\":\"withSelectItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Select_item_global.map"],
  "mappings": "2HAA8H,IAAMA,EAAe,CAAC,IAAI,CAAC,UAAU,qBAAqB,WAAW,qBAAqB,cAAc,WAAW,MAAM,GAAG,EAAE,0BAA0B,CAAC,UAAU,0BAA0B,WAAW,qBAAqB,cAAc,WAAW,MAAM,IAAI,EAAE,gBAAgB,CAAC,UAAU,uBAAuB,WAAW,qBAAqB,cAAc,WAAW,MAAM,CAAC,EAAE,GAAG,CAAC,UAAU,kBAAkB,WAAW,qBAAqB,cAAc,WAAW,MAAM,GAAG,EAAE,8BAA8B,CAAC,UAAU,oCAAoC,WAAW,qBAAqB,cAAc,WAAW,MAAM,GAAG,EAAE,gBAAgB,CAAC,UAAU,+CAA+C,WAAW,qBAAqB,cAAc,WAAW,MAAM,IAAI,EAAE,cAAc,CAAC,UAAU,aAAa,WAAW,qBAAqB,cAAc,WAAW,MAAM,GAAG,EAAE,eAAe,CAAC,UAAU,2BAA2B,WAAW,qBAAqB,cAAc,WAAW,MAAM,IAAI,EAAE,kC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AAmBpB,EAAeW,CAAS",
  "names": ["itemDetailsMap", "useStore", "createStore", "withSelectItem", "Component", "props", "store", "setStore", "handleClick", "itemKey", "window", "normalizedItemKey", "itemDetails", "p", "CtaButton", "EnhancedCtaButton1", "EnhancedCtaButton2", "EnhancedCtaButton3", "EnhancedCtaButton4", "EnhancedCtaButton5", "EnhancedCtaButton6", "EnhancedCtaButton7", "EnhancedCtaButton8", "EnhancedCtaButton9"]
}
