{"version":3,"file":"ShareOnFacebook.BlGtqm_S.mjs","names":[],"sources":["https:/framerusercontent.com/modules/7JOszn06VBvBoDduhLyd/vLoZGOENhAq6ecL6Eyu1/OpenGraphMetadata.js","https:/framerusercontent.com/modules/wstFb6aEPBBkaGNZ4DRZ/qifL8H1AJFAAFaRKsG6e/ShareOnFacebook.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function OpenGraphMetadata({title=\"\",description=\"\",image=\"\",slug=\"\"}){useEffect(()=>{function setMeta(property,content){if(!content||content===\"undefined\"||content===\"\")return;let element=document.querySelector(`meta[property=\"${property}\"]`);if(!element){element=document.createElement(\"meta\");element.setAttribute(\"property\",property);document.head.appendChild(element);}element.setAttribute(\"content\",content);}// Oppdater Open Graph-metadataene med riktige verdier\nsetMeta(\"og:title\",title||\"Standard tittel\");setMeta(\"og:description\",description||\"Standard beskrivelse\");setMeta(\"og:image\",image||\"https://www.legedom.no/default-image.jpg\");setMeta(\"og:url\",slug?`https://www.legedom.no/${slug}`:\"https://www.legedom.no/\");setMeta(\"og:type\",\"article\");console.log(\"✅ Open Graph metadata oppdatert!\",{title,description,image,slug});},[title,description,image,slug]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"},children:\"OpenGraphMetadata aktiv!\"});}// 📌 Property Controls for å koble til CMS i Framer\naddPropertyControls(OpenGraphMetadata,{title:{type:ControlType.String,title:\"Title\"},description:{type:ControlType.String,title:\"Description\"},image:{type:ControlType.String,title:\"Image URL\"},slug:{type:ControlType.String,title:\"Slug\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"OpenGraphMetadata\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OpenGraphMetadata.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export default function ShareOnFacebook({slug}){const[currentUrl,setCurrentUrl]=useState(\"https://legedom.no/\");useEffect(()=>{if(typeof window!==\"undefined\"){setCurrentUrl(window.location.href);}},[]);const shareUrl=slug?`https://legedom.no/${slug}`:currentUrl;return /*#__PURE__*/_jsx(\"button\",{onClick:()=>{if(typeof window!==\"undefined\"){window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`,\"_blank\");}},style:{padding:\"10px 15px\",backgroundColor:\"#1877F2\",color:\"white\",border:\"none\",borderRadius:\"5px\",cursor:\"pointer\",fontWeight:\"bold\",fontSize:\"18px\"},children:\"Del p\\xe5 Facebook\"});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShareOnFacebook\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShareOnFacebook.map"],"mappings":"kTAA4H,SAAwB,EAAkB,CAAC,QAAM,GAAG,cAAY,GAAG,QAAM,GAAG,OAAK,GAAG,CAAC,CACgM,MAD/L,GAAU,IAAI,CAAC,SAAS,EAAQ,EAAS,EAAQ,CAAC,IAAI,GAAS,IAAU,aAAa,IAAU,GAAG,OAAO,IAAI,EAAQ,SAAS,eAAe,iBAAiB,EAAS,IAAI,CAAK,IAAS,EAAQ,SAAS,cAAc,OAAO,CAAC,EAAQ,aAAa,WAAW,EAAS,CAAC,SAAS,KAAK,YAAY,EAAQ,IAAU,aAAa,UAAU,EAAQ,AAAE,CAC1Q,AAAhS,EAAQ,WAAW,GAAO,kBAAkB,CAAC,EAAQ,iBAAiB,GAAa,uBAAuB,CAAC,EAAQ,WAAW,GAAO,2CAA2C,CAAC,EAAQ,SAAS,GAAM,yBAAyB,IAAO,0BAA0B,CAAC,EAAQ,UAAU,UAAU,CAAC,QAAQ,IAAI,mCAAmC,CAAC,QAAM,cAAY,QAAM,MAAK,EAAC,AAAE,EAAC,CAAC,E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