{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/store.js@^1.0.0", "ssg:https://framerusercontent.com/modules/29LicGCFN74YSLnySL22/mcIbH5GEivwLS5KlkEGm/Select_item.js"],
  "sourcesContent": ["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";// Mapa de detalles de los items\nconst itemDetailsMap={\"oposiciones-auxiliares-administrativo-del-estado\":{item_name:\"Oposiciones Auxiliares Administrativo del Estado\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-administrativo-del-estado\":{item_name:\"Oposiciones Administrativo del Estado\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-administrativo-de-la-seguridad-social\":{item_name:\"Oposiciones Administrativo de la Seguridad Social\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-gesti\\xf3n-de-la-administraci\\xf3n-civil-del-estado\":{item_name:\"Oposiciones Gesti\\xf3n de la Administraci\\xf3n Civil del Estado\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-auxiliares-administrativos-del-ayuntamiento-de-madrid\":{item_name:\"Oposiciones Auxiliares Administrativos del Ayuntamiento de Madrid\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-auxilio-judicial\":{item_name:\"Oposiciones Auxilio Judicial\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-tramitaci\\xf3n-procesal\":{item_name:\"Oposiciones Tramitaci\\xf3n Procesal\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-gesti\\xf3n-procesal\":{item_name:\"Oposiciones Gesti\\xf3n Procesal\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-agentes-de-hacienda\":{item_name:\"Oposiciones Agentes de Hacienda\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-controladores-a\\xe9reos\":{item_name:\"Oposiciones Controladores A\\xe9reos\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0},\"oposiciones-administradores-de-la-uni\\xf3n-europea\":{item_name:\"Oposiciones Administradores de la Uni\\xf3n Europea\",item_brand:\"Supera\",item_category:\"Oposici\\xf3n\",price:0}};// 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=itemId=>{// Limpiar el objeto ecommerce anterior\nwindow.dataLayer.push({ecommerce:null});// Obtener los detalles del item desde el mapa\nconst itemDetails=itemDetailsMap[itemId];if(itemDetails){// Empujar el evento select_item al dataLayer\nwindow.dataLayer.push({event:\"select_item\",ecommerce:{items:[{item_name:itemDetails.item_name,affiliation:\"Supera\",price:itemDetails.price,item_brand:itemDetails.item_brand,item_category:itemDetails.item_category}]}});console.log(\"select_item event pushed for:\",itemDetails);setStore({itemSelected:itemDetails});}else{console.error(\"Item details not found for ID:\",itemId);}};return /*#__PURE__*/_jsx(Component,{...props,onClick:()=>handleClick(props.id)});};}const CtaButton=props=>{return /*#__PURE__*/_jsx(\"button\",{...props,children:props.children});};// Agregando todos los botones\nconst EnhancedCtaButton=withSelectItem(CtaButton);const Home=()=>{return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-auxiliares-administrativo-del-estado\",children:\"Oposiciones Auxiliares Administrativo del Estado\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-administrativo-del-estado\",children:\"Oposiciones Administrativo del Estado\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-administrativo-de-la-seguridad-social\",children:\"Oposiciones Administrativo de la Seguridad Social\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-gesti\\xf3n-de-la-administraci\\xf3n-civil-del-estado\",children:\"Oposiciones Gesti\\xf3n de la Administraci\\xf3n Civil del Estado\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-auxiliares-administrativos-del-ayuntamiento-de-madrid\",children:\"Oposiciones Auxiliares Administrativos del Ayuntamiento de Madrid\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-auxilio-judicial\",children:\"Oposiciones Auxilio Judicial\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-tramitaci\\xf3n-procesal\",children:\"Oposiciones Tramitaci\\xf3n Procesal\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-gesti\\xf3n-procesal\",children:\"Oposiciones Gesti\\xf3n Procesal\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-agentes-de-hacienda\",children:\"Oposiciones Agentes de Hacienda\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-controladores-a\\xe9reos\",children:\"Oposiciones Controladores A\\xe9reos\"}),/*#__PURE__*/_jsx(EnhancedCtaButton,{id:\"oposiciones-administradores-de-la-uni\\xf3n-europea\",children:\"Oposiciones Administradores de la Uni\\xf3n Europea\"})]});};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.map"],
  "mappings": "2IAAqF,SAASA,EAAYC,EAAO,CACjH,IAAMC,EAAUC,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGF,CAAM,CAAC,CAAC,CAAC,EACjDG,EAAaC,GAAU,CAC1B,OAAOA,GAAW,aAAYA,EAASA,EAASH,EAAU,KAAK,GAAGA,EAAU,MAAM,OAAO,OAAO,CAAC,GAAGA,EAAU,MAAM,GAAGG,CAAQ,CAAC,CAAE,EACjIC,EAAW,OAAOL,GAAS,SAAS,OAAO,OAAO,CAAC,GAAGA,CAAM,CAAC,EAAEA,EAC7DM,EAAa,IAAI,IACjBC,EAAcH,GAAU,CAC3B,OAAOA,GAAW,aAAYA,EAASA,EAASC,CAAU,GAAGA,EAAW,OAAOD,GAAW,SAAS,OAAO,OAAO,CAAC,GAAGC,EAAW,GAAGD,CAAQ,CAAC,EAAEA,EACjJE,EAAa,QAAQE,GAAQA,EAAOH,CAAU,CA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EAAS,EAAQO,EAAYC,GAAQ,CACpKC,EAAO,UAAU,KAAK,CAAC,UAAU,IAAI,CAAC,EACtC,IAAMC,EAAYX,EAAeS,CAAM,EAAKE,GAC5CD,EAAO,UAAU,KAAK,CAAC,MAAM,cAAc,UAAU,CAAC,MAAM,CAAC,CAAC,UAAUC,EAAY,UAAU,YAAY,SAAS,MAAMA,EAAY,MAAM,WAAWA,EAAY,WAAW,cAAcA,EAAY,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,gCAAgCA,CAAW,EAAEJ,EAAS,CAAC,aAAaI,CAAW,CAAC,GAAQ,QAAQ,MAAM,iCAAiCF,CAAM,CAAG,EAAE,OAAoBG,EAAKR,EAAU,CAAC,GAAGC,EAAM,QAAQ,IAAIG,EAAYH,EAAM,EAAE,CAAC,CAAC,CAAE,CAAE,CAAC,IAAMQ,EAAUR,GAA4BO,EAAK,SAAS,CAAC,GAAGP,EAAM,SAASA,EAAM,QAAQ,CAAC,EACliBS,EAAkBX,EAAeU,CAAS",
  "names": ["createStore", "state1", "dataStore", "Data", "setDataStore", "newState", "storeState", "storeSetters", "setStoreState", "setter", "useStore", "state", "setState", "ye", "ue", "useObserveData", "itemDetailsMap", "useStore", "createStore", "withSelectItem", "Component", "props", "store", "setStore", "handleClick", "itemId", "window", "itemDetails", "p", "CtaButton", "EnhancedCtaButton"]
}
