{"version":3,"sources":["webpack:///./src/templates/page-general.js","webpack:///./src/components/home/menu.js"],"names":["PageGeneralTemplate","data","asmetHome","useAsmetHome","pageGeneral","pageHierarchy","usePageHierarchy","strapiId","groupedComponents","useGroupedComponents","contenido_general","useState","doHeader","setDoHeader","useEffect","tipo_componente","crumbs","forEach","el","push","path","slug","label","titulo","loaded","setLoaded","meta","og_titulo","id","className","onLoad","map","item","index","component","key","pageId","menuSecundario","menu_secundario","Menu","props","link","customClass","src","icono","publicURL","alt","nombre","defaultProps","tipo","link_id"],"mappings":"8FAAA,oHAoEeA,UArDa,SAAH,GAAkB,IAAZC,EAAI,EAAJA,KACvBC,EAAYC,cAEZC,EAAcH,EAAKG,YACnBC,EAAgBC,YAAiBF,EAAYG,UAC7CC,EAAoBC,YAAqBL,EAAYM,mBAE3D,EAAgCC,oBAAS,GAAlCC,EAAQ,KAAEC,EAAW,KAC5BC,qBAAU,WACRD,EAAiE,SAArDT,EAAYM,kBAAkB,GAAGK,mBAC5C,CAACX,EAAYM,oBAEhB,IAAMM,EAAS,GAEfX,EAAcY,SAAQ,SAAAC,GACpBF,EAAOG,KAAK,CAAEC,KAAK,WAAYF,EAAGG,KAAQC,MAAOJ,EAAGK,YAGtD,MAA4BZ,oBAAS,GAA9Ba,EAAM,KAAEC,EAAS,KAExB,OACE,kBAAC,IAAM,CACLC,KACEtB,EAAYsB,KAAOtB,EAAYsB,KAAO,CAAEC,UAAWvB,EAAYmB,SAGhEX,GACC,yBAAKgB,GAAG,sBAAsBC,UAAU,6BACtC,yBAAKA,UAAU,aACb,yBAAKA,UAAU,OACb,yBAAKA,UAAU,OACb,kBAAC,IAAU,CAACb,OAAQA,IACpB,wBAAIa,UAAU,mCAAmCzB,EAAYmB,YAMvE,uCACEK,GAAG,mBACHE,OAAQ,kBAAML,GAAU,KACnBD,EAAS,CAAEK,UAAW,sBAAyB,IAEnDrB,EAAkBuB,KAAI,SAACC,EAAMC,GAC5B,OAAO,kBAAC,IAAe,CAACC,UAAWF,EAAMC,MAAOA,EAAOE,IAAKF,EAAOG,OAAQhC,EAAYiB,WAG3F,6BACA,kBAAC,IAAI,CAACgB,eAAgBnC,EAAUoC,qB,kCC/DtC,qCAMMC,EAAO,SAAAC,GACX,IAAQH,EAAmBG,EAAnBH,eACR,OACE,yBAAKT,GAAG,WAAWC,UAAU,0BAC3B,yBAAKA,UAAU,OACZQ,EAAeN,KAAI,SAACC,EAAMC,GACzB,OACE,yBAAKJ,UAAU,qBAAqBM,IAAKF,GACvC,kBAAC,IAAU,CACTQ,KAAMT,EACNU,YAAa,YAAwB,IAAVT,EAAc,UAAY,KAErD,yBAAKU,IAAKX,EAAKY,OAASZ,EAAKY,MAAMC,UAAYb,EAAKY,MAAMC,UAAY,4BAA6BC,IAAKd,EAAKe,SAC5Gf,EAAKe,eAuBtBR,EAAKS,aAAe,CAClBX,eAAgB,CACd,CACEU,OAAO,uBACPE,KAAK,SACLC,QAAQ,IACRN,MAAO,CACLC,UAAU,oFAMHN","file":"component---src-templates-page-general-js-54a3fa41d675ec3148e2.js","sourcesContent":["import React, { useEffect, useState } from \"react\"\nimport { graphql } from \"gatsby\"\n\n// Layout\nimport Layout from \"../components/layout\"\n// Components\nimport Menu from \"../components/home/menu\"\nimport Breadcrumb from \"../components/elements/breadcrumb\"\nimport CustomComponent from \"../components/elements/custom-component\"\n\n// Hooks\nimport { useAsmetHome } from \"../hooks/use-asmet-home\"\nimport { usePageHierarchy } from \"../hooks/use-page-hierarchy\"\nimport { useGroupedComponents } from \"../hooks/use-grouped-components\"\n\nconst PageGeneralTemplate = ({ data }) => {\n const asmetHome = useAsmetHome()\n\n const pageGeneral = data.pageGeneral\n const pageHierarchy = usePageHierarchy(pageGeneral.strapiId)\n const groupedComponents = useGroupedComponents(pageGeneral.contenido_general)\n\n const [doHeader, setDoHeader] = useState(true)\n useEffect(() => {\n setDoHeader(pageGeneral.contenido_general[0].tipo_componente !== \"Menu\")\n }, [pageGeneral.contenido_general])\n\n const crumbs = []\n\n pageHierarchy.forEach(el => {\n crumbs.push({ path: `/pagina/${el.slug}`, label: el.titulo })\n })\n\n const [loaded, setLoaded] = useState(false)\n\n return (\n \n {doHeader && (\n
\n
\n
\n
\n \n

{pageGeneral.titulo}

\n
\n
\n
\n
\n )}\n setLoaded(true)}\n {...(loaded ? { className: \"asm-element-loaded\" } : {})}\n >\n {groupedComponents.map((item, index) => {\n return \n })}\n \n
\n \n \n )\n}\n\nexport default PageGeneralTemplate\n\nexport const query = graphql`\n query PageGeneral($id: String!) {\n pageGeneral: strapiAsmetPagina(strapiId: { eq: $id }) {\n strapiId\n titulo\n slug\n meta {\n og_titulo\n og_imagen {\n publicURL\n }\n og_descripcion\n }\n\n contenido_general {\n id\n tipo_componente\n\n # Component Menu\n titulo\n subtitulo\n links {\n nombre\n tipo\n link_id\n icono {\n publicURL\n }\n }\n\n # Component Texto\n\n contenido\n\n # Component Documento\n\n fecha_publicacion\n es_descargable\n descripcion\n archivo {\n publicURL\n extension\n }\n\n # Component Foto\n\n media_fotos {\n id\n slug\n titulo\n fecha\n imagenes {\n formats {\n thumbnail {\n publicURL\n }\n small {\n publicURL\n }\n medium {\n publicURL\n }\n large {\n publicURL\n }\n }\n url\n }\n descripcion\n }\n \n # Component Video\n\n media_videos {\n id\n slug\n titulo\n link\n descripcion\n publicado_en\n tipo\n }\n\n # Componente Audio\n\n media_audios {\n id\n slug\n titulo\n archivo {\n publicURL\n }\n descripcion\n publicado_en\n tipo\n }\n\n # Component Banner\n\n slides {\n tipo_componente\n titulo\n subtitulo\n imagen {\n publicURL\n }\n link {\n nombre\n tipo\n link_id\n icono {\n publicURL\n }\n }\n }\n\n # Component Card\n\n imagen {\n publicURL\n }\n link {\n nombre\n tipo\n link_id\n icono {\n publicURL\n }\n }\n\n # Component Grupo Cards\n\n cards {\n tipo_componente\n titulo\n descripcion\n imagen {\n publicURL\n }\n link {\n nombre\n tipo\n link_id\n icono {\n publicURL\n }\n }\n }\n\n # Component Lista Desplegable Texto\n # Component Lista Desplegable Documento\n\n documentacion {\n tipo_componente\n titulo\n fecha_publicacion\n es_descargable\n descripcion\n archivo {\n publicURL\n extension\n }\n }\n\n # Component Pestanas Listas Desplegables\n\n icono {\n publicURL\n }\n listas_documentacion {\n tipo_componente\n titulo\n documentacion {\n tipo_componente\n titulo\n fecha_publicacion\n es_descargable\n descripcion\n archivo {\n publicURL\n extension\n }\n }\n }\n listas_texto {\n tipo_componente\n titulo\n contenido\n }\n }\n }\n }\n`\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\n// Components\nimport CustomLink from \"../elements/custom-link\"\n\nconst Menu = props => {\n const { menuSecundario } = props\n return (\n
\n
\n {menuSecundario.map((item, index) => {\n return (\n
\n \n {item.nombre}\n {item.nombre}\n \n
\n )\n })}\n
\n
\n )\n}\n\nMenu.propTypes = {\n menuSecundario: PropTypes.arrayOf(\n PropTypes.shape({\n nombre: PropTypes.string.isRequired,\n tipo: PropTypes.string.isRequired,\n link_id: PropTypes.string.isRequired,\n icono: PropTypes.shape({\n publicURL: PropTypes.string.isRequired,\n }).isRequired,\n })\n ).isRequired,\n}\n\nMenu.defaultProps = {\n menuSecundario: [\n {\n nombre: `AfiliaciĆ³n a la Mano`,\n tipo: `Pagina`,\n link_id: `/`,\n icono: {\n publicURL: `/static/6e42e9fd87b792be6a3040d64eeec6b3/36e2e83e7518ebc69a1b6b2108c16be8.png`,\n },\n },\n ],\n}\n\nexport default Menu\n"],"sourceRoot":""}