{"version":3,"file":"SmartStoreButton.BTI2zvAP.mjs","names":[],"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":"iUAAqI,SAAgB,EAAiB,EAAM,CAAC,GAAK,CAAC,EAAI,EAAO,CAAC,EAAS,IAAI,CAA0P,MAAzP,GAAU,IAAI,CAAC,IAAM,EAAG,EAAU,WAAW,EAAU,QAAQ,EAAO,MAAM,AAAG,WAAW,KAAK,EAAG,CAAE,EAAO,EAAM,cAAc,CAAU,mBAAmB,KAAK,EAAG,GAAG,EAAO,SAAU,EAAO,EAAM,YAAY,CAAO,EAAO,EAAM,YAAY,AAAG,EAAC,CAAE,EAAC,CAAqB,EAAK,IAAI,CAAC,KAAK,EAAI,OAAO,SAAS,IAAI,sBAAsB,MAAM,CAAC,QAAQ,eAAe,WAAW,EAAM,WAAW,MAAM,EAAM,MAAM,WAAW,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,iBAAiB,EAAM,cAAc,IAAI,cAAc,EAAM,WAAW,GAAI,EAAC,SAAS,EAAM,KAAM,EAAC,AAAE,cAA6U,IAA/wC,GAA2C,IAAsC,IAAoD,CAA6zB,EAAiB,aAAa,CAAC,MAAM,cAAc,YAAY,yCAAyC,cAAc,4DAA4D,YAAY,6BAA6B,WAAW,OAAO,MAAM,OAAO,SAAS,GAAG,SAAS,GAAG,WAAU,EAAM,SAAS,GAAG,cAA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