{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/E70p2urSxves6ZMtiSYz/CKF9ayYiS7xctTUVEjjl/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\";// Mapa de \u00EDtems con funci\u00F3n auxiliar para evitar repeticiones\nconst makeItem=(name,price)=>({item_name:name,item_brand:name,item_category:\"Programa\",price});const itemDetailsMap={dm:makeItem(\"Digital Marketing\",999),thepowermba:makeItem(\"thePowermba\",999),consulting:makeItem(\"Consulting\",2499),\"mba+dm\":makeItem(\"thePowermba + Digital Marketing\",1499),\"power sales\":makeItem(\"Power Sales\",999),\"mba+power sales\":makeItem(\"thePowermba + Power Sales\",1499),\"dm+power sales\":makeItem(\"Digital Marketing + Power Sales\",1499),\"mba+dm+power sales\":makeItem(\"thePowermba + Digital Marketing + Power Sales\",1799),data:makeItem(\"Data for Business\",999),finance:makeItem(\"Power Finance\",999)};// Store opcional para guardar el \u00EDtem seleccionado\nconst useStore=createStore({itemSelected:null});// Higher-Order Component para enviar evento select_item\nexport function withSelectItem(Component){return props=>{const[store,setStore]=useStore();const handleClick=itemKey=>{const itemDetails=itemDetailsMap[itemKey];if(itemDetails&&typeof window!==\"undefined\"&&Array.isArray(window.dataLayer)){// Limpiar evento anterior\nwindow.dataLayer.push({ecommerce:null});// Enviar evento select_item\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 or dataLayer not available for key:\",itemKey);}};const itemKey=props[\"data-framer-name\"]||props[\"name\"];return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>{console.log(\"Item clicked:\",itemKey);handleClick(itemKey);}});};}// Componente de bot\u00F3n reutilizable (puede ser una card tambi\u00E9n)\nconst CtaButton=props=>{return /*#__PURE__*/_jsx(\"button\",{...props,\"data-framer-name\":props[\"data-framer-name\"],children:props.children});};// Versi\u00F3n mejorada del componente Home renderizando din\u00E1micamente los botones\nconst Home=()=>{const itemKeys=Object.keys(itemDetailsMap);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:\"12px\",overflowX:\"auto\"},children:itemKeys.map(key=>{const EnhancedButton=withSelectItem(CtaButton);return /*#__PURE__*/_jsx(EnhancedButton,{\"data-framer-name\":key,children:itemDetailsMap[key].item_name},key);})});};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.map"],
  "mappings": "2HACA,IAAMA,EAAS,CAACC,EAAKC,KAAS,CAAC,UAAUD,EAAK,WAAWA,EAAK,cAAc,WAAW,MAAAC,CAAK,GAASC,EAAe,CAAC,GAAGH,EAAS,oBAAoB,GAAG,EAAE,YAAYA,EAAS,cAAc,GAAG,EAAE,WAAWA,EAAS,aAAa,IAAI,EAAE,SAASA,EAAS,kCAAkC,IAAI,EAAE,cAAcA,EAAS,cAAc,GAAG,EAAE,kBAAkBA,EAAS,4BAA4B,IAAI,EAAE,iBAAiBA,EAAS,kCAAkC,IAAI,EAAE,qBAAqBA,EAAS,gDAAgD,IAAI,EAAE,KAAKA,EAAS,oBAAoB,GAAG,EAAE,QAAQA,EAAS,gBAAgB,GAAG,CAAC,EACtmBI,EAASC,EAAY,CAAC,aAAa,IAAI,CAAC,EACvC,SAASC,EAAeC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEN,EAAS,EAAQO,EAAYC,GAAS,CAAC,IAAMC,EAAYV,EAAeS,CAAO,EAAKC,GAAa,OAAOC,EAAS,KAAa,MAAM,QAAQA,EAAO,SAAS,GAC3OA,EAAO,UAAU,KAAK,CAAC,UAAU,IAAI,CAAC,EACtCA,EAAO,UAAU,KAAK,CAAC,MAAM,cAAc,UAAU,CAAC,MAAM,CAAC,CAAC,UAAUD,EAAY,UAAU,YAAYA,EAAY,WAAW,MAAMA,EAAY,MAAM,cAAcA,EAAY,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,gCAAgCA,CAAW,EAAEH,EAAS,CAAC,aAAaG,CAAW,CAAC,GAAQ,QAAQ,MAAM,6DAA6DD,CAAO,CAAG,EAAQA,EAAQJ,EAAM,kBAAkB,GAAGA,EAAM,KAAQ,OAAoBO,EAAKR,EAAU,CAAC,GAAGC,EAAM,QAAQ,IAAI,CAAC,QAAQ,IAAI,gBAAgBI,CAAO,EAAED,EAAYC,CAAO,CAAE,CAAC,CAAC,CAAE,CAAE",
  "names": ["makeItem", "name", "price", "itemDetailsMap", "useStore", "createStore", "withSelectItem", "Component", "props", "store", "setStore", "handleClick", "itemKey", "itemDetails", "window", "p"]
}
