{"version":3,"file":"PreferredSourceButton.CB8D9nPy.mjs","names":[],"sources":["https:/framerusercontent.com/modules/YuR5y0hSIna5YivZtmiw/4C3E4RRxppCFp18KTiyS/PreferredSourceButton.js"],"sourcesContent":["// PreferredSourceButton: Google \"Add to Preferred Sources\" button for thewady.com (blog posts and /blogs).\n// Renders Google's official container <div google-add-preferred-source-btn>. The site head loads\n// https://news.google.com/swg/js/v1/publisher.js (site custom code, headEnd), which draws Google's button\n// in it. Inside sits a look-alike link to Google's source tool, shown only if the script does not run\n// (canvas, blocked script, client-side navigation).\n// Labels are Google's own strings, read from publisher.js with data-lang=\"ar\" and \"en\" (2 Oct 2026).\n// Guide: https://developers.google.com/search/docs/appearance/preferred-sources\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";const LINK=\"https://www.google.com/preferences/source?q=thewady.com\";const LABELS={ar:'الإضافة إلى \"المصادر المفضّلة\"',en:\"Add to Preferred Sources\"};/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function PreferredSourceButton({lang}){let code=lang;if(code===\"auto\"){let active=\"\";try{active=useLocaleInfo()?.activeLocale?.code||\"\";}catch(e){}code=active.startsWith(\"en\")?\"en\":\"ar\";}const label=LABELS[code];return /*#__PURE__*/_jsx(\"div\",{\"google-add-preferred-source-btn\":\"\",\"data-theme\":\"light\",\"data-lang\":code,style:{display:\"inline-flex\"},children:/*#__PURE__*/_jsxs(\"a\",{href:LINK,target:\"_blank\",rel:\"noopener\",\"aria-label\":label,dir:code===\"ar\"?\"rtl\":\"ltr\",style:{display:\"inline-flex\",alignItems:\"center\",gap:10,height:40,padding:\"0 16px 0 14px\",borderRadius:20,border:\"1px solid #c4c7c5\",background:\"#ffffff\",color:\"#1f1f1f\",fontFamily:\"inherit\",fontSize:14,fontWeight:500,lineHeight:\"20px\",whiteSpace:\"nowrap\",textDecoration:\"none\",cursor:\"pointer\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"22\",height:\"22\",viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",style:{flexShrink:0},children:[/*#__PURE__*/_jsx(\"path\",{fill:\"#4285F4\",d:\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z\"}),/*#__PURE__*/_jsx(\"path\",{fill:\"#34A853\",d:\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"}),/*#__PURE__*/_jsx(\"path\",{fill:\"#FBBC05\",d:\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z\"}),/*#__PURE__*/_jsx(\"path\",{fill:\"#EA4335\",d:\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"})]}),/*#__PURE__*/_jsx(\"span\",{children:label})]})});}PreferredSourceButton.defaultProps={lang:\"auto\"};addPropertyControls(PreferredSourceButton,{lang:{type:ControlType.Enum,title:\"Language\",options:[\"auto\",\"ar\",\"en\"],optionTitles:[\"Auto (page locale)\",\"Arabic\",\"English\"],defaultValue:\"auto\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PreferredSourceButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PreferredSourceButton.map"],"mappings":"2K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