{"version":3,"file":"TableOfContents.B7LfIvxc.mjs","names":[],"sources":["https:/framerusercontent.com/modules/OTFD74cLM0WRcnxbTkdJ/FDdcZf5xuYUud0j11yxk/TableOfContents.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export default function TableOfContents(){const[headings,setHeadings]=useState([]);useEffect(()=>{const h2Elements=Array.from(document.querySelectorAll(\"h2\"));// Usuwamy dwa ostatnie elementy\n// (czyli 'Zobacz także...' i 'Zamów bezpłatną wycenę')\nconst filtered=h2Elements.slice(0,-2);const updatedHeadings=filtered.map((el,index)=>{if(!el.id){const slug=`section-${index}`;el.id=slug;}return{id:el.id,text:el.textContent||`Sekcja ${index+1}`};});setHeadings(updatedHeadings);},[]);const scrollToSection=id=>{const target=document.getElementById(id);if(target){target.scrollIntoView({behavior:\"smooth\"});}};// Styl typograficzny zgodny z resztą strony\nconst typographyStyle={fontFamily:\"Inter, sans-serif\",fontSize:\"18px\",fontWeight:400,color:\"#1a1a1a\"};// Styl dla nagłówka spisu treści\nconst headingStyle={...typographyStyle,fontWeight:600,marginBottom:\"0.5rem\"};// Styl dla elementów listy z zachowaniem koloru linkowego dla interaktywności\nconst listItemStyle={...typographyStyle,color:\"#2563eb\",cursor:\"pointer\"};return /*#__PURE__*/_jsxs(\"div\",{className:\"p-4 rounded-xl shadow-lg bg-white w-full max-w-md\",children:[/*#__PURE__*/_jsx(\"h3\",{style:headingStyle,className:\"mb-2\",children:\"Spis treści\"}),/*#__PURE__*/_jsx(\"ul\",{className:\"list-disc pl-5 space-y-1\",children:headings.map(({id,text})=>/*#__PURE__*/_jsx(\"li\",{style:listItemStyle,className:\"hover:underline\",onClick:()=>scrollToSection(id),children:text},id))})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TableOfContents\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"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