{"version":3,"file":"StructuredData.B2fcsgx3.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/SbyZoh3GGuCX46UfzyBh/5CY8s5ySZUBYkhuEpJfh/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType,name,description,canonicalUrl,canonicalBaseUrl,canonicalSlug,authorName,datePublished,imageUrl,organizationName}=props;const jsonLd=useMemo(()=>{const schema={\"@context\":\"https://schema.org\",\"@type\":schemaType||\"WebPage\"};const normalizeToString=value=>{if(typeof value===\"string\")return value.trim();if(typeof value===\"number\"&&Number.isFinite(value))return String(value);if(value instanceof Date&&!Number.isNaN(value.getTime()))return value.toISOString();if(value&&typeof value===\"object\"&&\"src\"in value){const srcValue=value.src;return typeof srcValue===\"string\"?srcValue.trim():\"\";}return\"\";};const addIfPresent=(key,value)=>{const normalized=normalizeToString(value);if(normalized.length>0)schema[key]=normalized;};const resolvedUrl=(()=>{const explicitCanonicalUrl=normalizeToString(canonicalUrl);if(explicitCanonicalUrl)return explicitCanonicalUrl;const base=normalizeToString(canonicalBaseUrl);const slug=normalizeToString(canonicalSlug);if(base&&slug){const normalizedBase=base.endsWith(\"/\")?base:`${base}/`;return`${normalizedBase}${encodeURIComponent(slug)}`;}if(base)return base;return\"\";})();switch(schemaType){case\"Organization\":addIfPresent(\"name\",name||organizationName);addIfPresent(\"description\",description);addIfPresent(\"url\",resolvedUrl);break;case\"Article\":addIfPresent(\"headline\",name);addIfPresent(\"description\",description);addIfPresent(\"url\",resolvedUrl);if(authorName&&authorName.trim()){schema.author={\"@type\":\"Person\",name:authorName.trim()};}addIfPresent(\"datePublished\",datePublished);addIfPresent(\"image\",imageUrl);if(organizationName&&organizationName.trim()){schema.publisher={\"@type\":\"Organization\",name:organizationName.trim()};}break;default:addIfPresent(\"name\",name);addIfPresent(\"description\",description);addIfPresent(\"url\",resolvedUrl);if(schemaType===\"Service\"&&organizationName&&organizationName.trim()){schema.provider={\"@type\":\"Organization\",name:organizationName.trim()};}break;}return JSON.stringify(schema);},[schemaType,name,description,canonicalUrl,canonicalBaseUrl,canonicalSlug,authorName,datePublished,imageUrl,organizationName]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",opacity:0,pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:jsonLd}})});}addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Schema Type\",defaultValue:\"WebPage\",options:[\"WebSite\",\"Organization\",\"WebPage\",\"CollectionPage\",\"Article\",\"Service\",\"ContactPage\"],optionTitles:[\"WebSite\",\"Organization\",\"WebPage\",\"CollectionPage\",\"Article\",\"Service\",\"ContactPage\"]},name:{type:ControlType.String,title:\"Name\",defaultValue:\"\",placeholder:\"Schema name\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",placeholder:\"Schema description\",displayTextArea:true},canonicalUrl:{type:ControlType.String,title:\"Canonical URL\",defaultValue:\"\",placeholder:\"https://example.com/page\"},canonicalBaseUrl:{type:ControlType.String,title:\"Canonical Base URL\",defaultValue:\"\",placeholder:\"https://example.com/blog\"},canonicalSlug:{type:ControlType.String,title:\"Canonical Slug\",defaultValue:\"\",placeholder:\"my-page-slug\"},authorName:{type:ControlType.String,title:\"Author Name\",defaultValue:\"\",placeholder:\"Author\"},datePublished:{type:ControlType.Date,title:\"Date Published\",defaultValue:\"\",displayTime:false},imageUrl:{type:ControlType.Image,title:\"Image URL\"},organizationName:{type:ControlType.String,title:\"Organization\",defaultValue:\"International Commercial Law Alliance\",placeholder:\"Organization name\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"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