{"version":3,"file":"SmartStoreButton.DFb-mYg3.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/24FzdJgmQ5B1X2zyApkJ/5cKoty8AJ3f2ivEJ5592/SmartStoreButton.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function SmartStoreButton(props){const[url,setUrl]=useState(\"#\");useEffect(()=>{const ua=navigator.userAgent||navigator.vendor||window.opera;if(/android/i.test(ua)){setUrl(props.googlePlayUrl);}else if(/iPad|iPhone|iPod/.test(ua)&&!window.MSStream){setUrl(props.appStoreUrl);}else{setUrl(props.fallbackUrl);}},[]);return /*#__PURE__*/_jsx(\"a\",{href:url,target:\"_blank\",rel:\"noopener noreferrer\",style:{display:\"inline-block\",background:props.background,color:props.color,padding:`${props.paddingY}px ${props.paddingX}px`,borderRadius:\"9999px\",width:props.fullWidth?\"100%\":\"auto\",textDecoration:\"none\",textAlign:\"center\",cursor:\"pointer\",fontFamily:\"'Plus Jakarta Sans', sans-serif\",fontSize:props.fontSize,fontWeight:700,letterSpacing:`${props.letterSpacing}px`,lineHeight:`${props.lineHeight}em`},children:props.label});}SmartStoreButton.defaultProps={label:\"Get the app\",appStoreUrl:\"https://apps.apple.com/app/id000000000\",googlePlayUrl:\"https://play.google.com/store/apps/details?id=com.example\",fallbackUrl:\"https://www.unitedhive.com\",background:\"#000\",color:\"#fff\",paddingX:24,paddingY:12,fullWidth:false,fontSize:18,letterSpacing:.5,lineHeight:1};addPropertyControls(SmartStoreButton,{label:{type:ControlType.String,title:\"Button Text\"},appStoreUrl:{type:ControlType.String,title:\"iOS Link\"},googlePlayUrl:{type:ControlType.String,title:\"Android Link\"},fallbackUrl:{type:ControlType.String,title:\"Fallback Link\"},background:{type:ControlType.Color,title:\"Background\"},color:{type:ControlType.Color,title:\"Text Color\"},paddingX:{type:ControlType.Number,title:\"Horizontal Padding\"},paddingY:{type:ControlType.Number,title:\"Vertical Padding\"},fullWidth:{type:ControlType.Boolean,title:\"Full Width\"},fontSize:{type:ControlType.Number,title:\"Font Size\"},letterSpacing:{type:ControlType.Number,title:\"Letter Spacing (px)\"},lineHeight:{type:ControlType.Number,title:\"Line Height (em)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"SmartStoreButton\":{\"type\":\"reactComponent\",\"name\":\"SmartStoreButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmartStoreButton.map"],"mappings":"sMAAqI,SAAgB,EAAiB,EAAM,CAAC,GAAK,CAAC,EAAI,GAAQA,EAAS,IAAI,CAA0P,OAAzP,MAAc,CAAC,IAAM,EAAG,EAAU,WAAW,EAAU,QAAQ,EAAO,MAAS,WAAW,KAAK,EAAG,CAAE,EAAO,EAAM,cAAc,CAAU,mBAAmB,KAAK,EAAG,EAAE,CAAC,EAAO,SAAU,EAAO,EAAM,YAAY,CAAO,EAAO,EAAM,YAAY,EAAI,EAAE,CAAC,CAAqB,EAAK,IAAI,CAAC,KAAK,EAAI,OAAO,SAAS,IAAI,sBAAsB,MAAM,CAAC,QAAQ,eAAe,WAAW,EAAM,WAAW,MAAM,EAAM,MAAM,QAAQ,GAAG,EAAM,SAAS,KAAK,EAAM,SAAS,IAAI,aAAa,SAAS,MAAM,EAAM,UAAU,OAAO,OAAO,eAAe,OAAO,UAAU,SAAS,OAAO,UAAU,WAAW,kCAAkC,SAAS,EAAM,SAAS,WAAW,IAAI,cAAc,GAAG,EAAM,cAAc,IAAI,WAAW,GAAG,EAAM,WAAW,IAAI,CAAC,SAAS,EAAM,MAAM,CAAC,sBAAr5B,IAAsC,IAAoD,CAA6zB,EAAiB,aAAa,CAAC,MAAM,cAAc,YAAY,yCAAyC,cAAc,4DAA4D,YAAY,6BAA6B,WAAW,OAAO,MAAM,OAAO,SAAS,GAAG,SAAS,GAAG,UAAU,GAAM,SAAS,GAAG,cAAc,GAAG,WAAW,E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