{"version":3,"file":"Blog_Share.BJCD3WVO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/pWK7YtJkYFSY6KelKvjP/RTshXpkoinNLpJjMClzK/Blog_Share.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export function SocialShareButton(props){const{slug,platform,iconColor,customIcon,iconScale}=props;const baseURL=\"https://noblevetclinic.com/blog/\";const fullUrl=`${baseURL}${slug}`;const encodedUrl=encodeURIComponent(fullUrl);const shareLinks={facebook:`https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`,twitter:`https://twitter.com/intent/tweet?url=${encodedUrl}`,linkedin:`https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`};// const openShareWindow = () => {\n//     const url = shareLinks[platform]\n//     if (url) {\n//         window.open(url, \"_blank\", \"width=600,height=400\")\n//     }\n// }\nconst openShareWindow=()=>{const url=shareLinks[platform];if(platform===\"facebook\"){navigator.share({title:\"Noble Vet Clinics!\",url:encodedUrl}).catch(err=>{console.warn(\"Native share failed, falling back:\",err);window.open(url,\"_blank\",\"width=600,height=400\");});}else{window.open(url,\"_blank\",\"width=600,height=400\");}};const iconStyle={width:\"32px\",height:\"32px\",fill:iconColor,display:\"block\",cursor:\"pointer\"};const icons={facebook:/*#__PURE__*/_jsx(\"svg\",{style:iconStyle,viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M22 12a10 10 0 1 0-11.5 9.87v-7h-2v-2.9h2v-2.2c0-2 1.2-3.1 3-3.1.9 0 1.8.1 1.8.1v2h-1c-1 0-1.3.6-1.3 1.3v1.9h2.3l-.4 2.9h-1.9v7A10 10 0 0 0 22 12\"})}),twitter:/*#__PURE__*/_jsx(\"svg\",{style:iconStyle,viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M5.01 3L10.89 10.12 5 20h2.27l4.59-7.02 5.13 7.02H19l-6.26-8.58L18.48 3h-2.2l-4.05 6.14L7.11 3H5.01z\"})}),linkedin:/*#__PURE__*/_jsx(\"svg\",{style:iconStyle,viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M20.5 3h-17A.5.5 0 0 0 3 3.5v17c0 .3.2.5.5.5h17c.3 0 .5-.2.5-.5v-17a.5.5 0 0 0-.5-.5zM8.3 18H6V9.5h2.3V18zM7.2 8.5A1.3 1.3 0 1 1 7.3 6a1.3 1.3 0 0 1 0 2.5zm10.8 9.5h-2.3v-4.1c0-1-.3-1.7-1.2-1.7-.7 0-1.1.5-1.2 1-.1.2-.1.5-.1.7V18H11V9.5h2.2v1.2c.3-.5 1-1.2 2.1-1.2 1.6 0 2.7 1 2.7 3.1V18z\"})})};return /*#__PURE__*/_jsx(\"div\",{onClick:openShareWindow,style:{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"fit-content\",height:\"fit-content\",cursor:\"pointer\"},children:customIcon?/*#__PURE__*/_jsx(\"img\",{src:customIcon,alt:\"Custom Icon\",style:{width:32,height:32,objectFit:\"contain\",transform:`scale(${iconScale})`,transformOrigin:\"center\",display:\"block\"}}):icons[platform]});}addPropertyControls(SocialShareButton,{slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"hamster-care-guide\"},platform:{type:ControlType.Enum,title:\"Platform\",options:[\"facebook\",\"twitter\",\"linkedin\"],optionTitles:[\"Facebook\",\"X (Twitter)\",\"LinkedIn\"],defaultValue:\"facebook\"},iconColor:{type:ControlType.Color,title:\"Icon Color (SVG)\",defaultValue:\"#1877F2\"},customIcon:{type:ControlType.Image,title:\"Custom Icon (SVG/PNG)\"},iconScale:{type:ControlType.Number,title:\"Icon Scale\",defaultValue:1,min:.5,max:2,step:.1,hidden:props=>!props.customIcon}});\nexport const __FramerMetadata__ = {\"exports\":{\"SocialShareButton\":{\"type\":\"reactComponent\",\"name\":\"SocialShareButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\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