{"version":3,"file":"ArticleSchema.bLE3JuPz.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/FQfy1A6EqoebpC5yIBQ4/ETsxEHIIgHkwwF8VHlUE/ArticleSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function upsertMeta(attr,key,value){if(!value)return;let el=document.head.querySelector(\"meta[\"+attr+'=\"'+key+'\"]');if(!el){el=document.createElement(\"meta\");el.setAttribute(attr,key);document.head.appendChild(el);}el.setAttribute(\"content\",value);}const ORG_ID=\"https://ncfeschools.com/#organization\";const ORG_LOGO=\"https://framerusercontent.com/images/iOSiIo5VaAT6pbETp40UIAY04Gw.png\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n */export default function ArticleSchema(props){const{title=\"\",description=\"\",datePublished=\"\",author=\"NCFE Editorial Team\",image,publisher=\"National Centre for Excellence (NCFE)\",publisherLogo=\"https://framerusercontent.com/images/7ZQLxV5IoXALXKeZJIP1OjEvbQ.jpg\"}=props;const scriptRef=useRef(null);const imageSrc=image&&image.src?image.src:\"\";// Built during BOTH static render and client render, so the JSON-LD ships\n// inside the published HTML rather than being injected after hydration.\nconst data={\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",headline:title,inLanguage:\"en-IN\",author:{\"@type\":\"Organization\",name:author||publisher},// Same entity as the site-wide head graph (seo-export/jsonld-head.html).\npublisher:{\"@type\":\"Organization\",\"@id\":ORG_ID,name:\"National Centre for Excellence\",logo:{\"@type\":\"ImageObject\",url:ORG_LOGO}}};if(description)data.description=description;if(imageSrc)data.image=[imageSrc];if(datePublished){data.datePublished=datePublished;data.dateModified=datePublished;}useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;if(!title)return;const url=window.location.origin+window.location.pathname;// Upgrade the statically rendered JSON-LD with the canonical URL, which\n// is only knowable in the browser.\nif(scriptRef.current){const withUrl={...data,url,mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":url}};scriptRef.current.textContent=JSON.stringify(withUrl);}// Per-post SEO + social meta (overrides site defaults for this article)\nupsertMeta(\"name\",\"description\",description);upsertMeta(\"property\",\"og:type\",\"article\");upsertMeta(\"property\",\"og:title\",title);upsertMeta(\"property\",\"og:description\",description);upsertMeta(\"property\",\"og:url\",url);if(imageSrc)upsertMeta(\"property\",\"og:image\",imageSrc);upsertMeta(\"name\",\"twitter:card\",imageSrc?\"summary_large_image\":\"summary\");upsertMeta(\"name\",\"twitter:title\",title);upsertMeta(\"name\",\"twitter:description\",description);if(imageSrc)upsertMeta(\"name\",\"twitter:image\",imageSrc);},[title,description,datePublished,author,imageSrc,publisher,publisherLogo]);if(!title)return null;return /*#__PURE__*/_jsx(\"script\",{ref:scriptRef,type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(data)}});}addPropertyControls(ArticleSchema,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true,defaultValue:\"\"},datePublished:{type:ControlType.Date,title:\"Date Published\"},author:{type:ControlType.String,title:\"Author\",defaultValue:\"NCFE Editorial Team\"},image:{type:ControlType.ResponsiveImage,title:\"Image\"},publisher:{type:ControlType.String,title:\"Publisher\",defaultValue:\"National Centre for Excellence (NCFE)\"},publisherLogo:{type:ControlType.String,title:\"Publisher Logo\",defaultValue:\"https://framerusercontent.com/images/7ZQLxV5IoXALXKeZJIP1OjEvbQ.jpg\"}});ArticleSchema.displayName=\"Article SEO schema\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleSchema\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"0\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"0\"}},\"__Framer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