{"version":3,"file":"PageOGTags.D8ITYGV2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/zlw6lzYA19gf9d56Y2qv/51dp5GGZHyWhOv9hmpRv/PageOGTags.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * Injects Open Graph and Twitter Card meta tags into the document head.\n * Place on every page. For CMS pages, bind pageTitle and description to CMS fields.\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PageOGTags({pageTitle,description,imageUrl=\"https://framerusercontent.com/images/s7pZabB1bHhupr2LZIZ9d8MOnRc.png\",pageType=\"website\",canonicalUrl}){useEffect(()=>{if(typeof document===\"undefined\")return;const siteUrl=\"https://www.hamrenergy.com\";const currentUrl=canonicalUrl||(typeof window!==\"undefined\"?window.location.href:siteUrl);const resolvedTitle=pageTitle?`${pageTitle} | HAMR Energy`:\"HAMR Energy | Australia's Renewable Fuels Platform\";const resolvedDesc=description||\"Australia's renewable fuels platform delivering 1M+ tonnes of low-carbon liquid fuels across APAC, serving shipping, aviation, and industrial sectors.\";const setMeta=(property,content,useProperty=true)=>{const attr=useProperty?\"property\":\"name\";let el=document.querySelector(`meta[${attr}=\"${property}\"]`);if(!el){el=document.createElement(\"meta\");el.setAttribute(attr,property);document.head.appendChild(el);}el.setAttribute(\"content\",content);};// Open Graph\nsetMeta(\"og:type\",pageType);setMeta(\"og:site_name\",\"HAMR Energy\");setMeta(\"og:title\",resolvedTitle);setMeta(\"og:description\",resolvedDesc);setMeta(\"og:image\",imageUrl);setMeta(\"og:url\",currentUrl);// Twitter Card\nsetMeta(\"twitter:card\",\"summary_large_image\",false);setMeta(\"twitter:title\",resolvedTitle,false);setMeta(\"twitter:description\",resolvedDesc,false);setMeta(\"twitter:image\",imageUrl,false);// Meta description fallback\nsetMeta(\"description\",resolvedDesc,false);},[pageTitle,description,imageUrl,pageType,canonicalUrl]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\",width:0,height:0}});}addPropertyControls(PageOGTags,{pageTitle:{type:ControlType.String,title:\"Page Title\",defaultValue:\"\",placeholder:\"e.g. About Us  (| HAMR Energy is added automatically)\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",placeholder:\"160 chars max. Bind to CMS field on template pages.\",displayTextArea:true},imageUrl:{type:ControlType.String,title:\"OG Image URL\",defaultValue:\"https://framerusercontent.com/images/s7pZabB1bHhupr2LZIZ9d8MOnRc.png\"},pageType:{type:ControlType.Enum,title:\"Page Type\",options:[\"website\",\"article\"],optionTitles:[\"Website\",\"Article\"],defaultValue:\"website\"},canonicalUrl:{type:ControlType.String,title:\"Canonical URL\",defaultValue:\"\",placeholder:\"Optional. Leave empty to use current URL.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageOGTags\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageOGTags.map"],"mappings":"yLAKG,SAAwB,EAAW,CAAC,YAAU,cAAY,WAAS,uEAAuE,WAAS,UAAU,gBAAc,CAG1E,OAH2E,MAAc,CAAC,GAAG,OAAO,SAAW,IAAY,OAAkD,IAAM,EAAW,IAAsB,IAAS,OAAiC,6BAArB,EAAO,SAAS,MAAoB,EAAc,EAAU,GAAG,EAAU,gBAAgB,qDAA2D,EAAa,GAAa,yJAA+J,GAAS,EAAS,EAAQ,EAAY,KAAO,CAAC,IAAM,EAAK,EAAY,WAAW,OAAW,EAAG,SAAS,cAAc,QAAQ,EAAK,IAAI,EAAS,GAAG,EAAM,IAAI,EAAG,SAAS,cAAc,MAAM,EAAE,EAAG,aAAa,EAAK,CAAQ,EAAE,SAAS,KAAK,YAAY,CAAE,GAAG,EAAG,aAAa,UAAU,CAAO,CAAE,EACz7B,EAAQ,UAAU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