{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/integrations-styles.js@^0.2.0", "ssg:https://framerusercontent.com/modules/3VbLlIQuOMJh9PZyYR3D/xG8adK1glTAxJchw5bER/ProductHunt.js"],
  "sourcesContent": ["import{containerStyles,emptyStateStyle as defaultEmptyStateStyle}from\"https://framer.com/m/framer/default-utils.js@^0.43.0\";export const emptyStateStyle={...containerStyles,...defaultEmptyStateStyle,textAlign:\"center\",padding:15,width:200,height:100,overflow:\"hidden\"};export const neutralStateStyle={...emptyStateStyle,color:\"#09f\",background:\"rgb(0, 153, 255, 0.1)\",borderColor:\"#09f\"};export const stateTitleStyle={fontSize:12,fontWeight:600,margin:0};export const stateParagraphStyle={fontSize:12,maxWidth:200,lineHeight:1.4,margin:\"5px 0 0 0\"};\nexport const __FramerMetadata__ = {\"exports\":{\"neutralStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"stateTitleStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"stateParagraphStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./styles.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,motion}from\"framer\";import{containerStyles}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{useMemo}from\"react\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@^0.2.0\";const BADGES={featured:\"featured.svg\",top:\"top-post-badge.svg\",review:\"review.svg\"};const productHuntRegex=/^https?:\\/\\/(?:www\\.)?producthunt\\.com\\/posts\\/([^\\/]*)/;/**\n * PRODUCT HUNT\n *\n * @framerIntrinsicWidth 250\n * @framerIntrinsicHeight 54\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */ export default function ProductHunt({url,type,theme,style,...props}){const badgeUrl=useMemo(()=>{var ref;const[,id]=(ref=url.match(productHuntRegex))!==null&&ref!==void 0?ref:[null,\"\"];if(!id)return null;return`https://api.producthunt.com/widgets/embed-image/v1/${BADGES[type]}?post_id=${id}&theme=${theme}`;},[url,type,theme]);return(/*#__PURE__*/ _jsx(motion.div,{style:{...style,...containerStyles,placeContent:\"center\",placeItems:\"center\",overflow:\"hidden\"},...props,children:badgeUrl?/*#__PURE__*/ _jsx(motion.a,{href:url,target:\"_blank\",style:{...style,width:250,height:54},...props,children:/*#__PURE__*/ _jsx(\"img\",{src:badgeUrl,alt:\"Product Hunt Badge\",width:\"250\",height:\"54\"})}):/*#__PURE__*/ _jsxs(motion.div,{style:{...emptyStateStyle,...style},...props,children:[/*#__PURE__*/ _jsx(\"h1\",{style:stateTitleStyle,children:\"Product Hunt\"}),/*#__PURE__*/ _jsx(\"p\",{style:stateParagraphStyle,children:\"Set a product URL in the Properties.\"})]})}));};addPropertyControls(ProductHunt,{url:{type:ControlType.String,title:\"URL\",placeholder:\"https://www.producthunt.com/posts/***\",defaultValue:\"https://www.producthunt.com/posts/framer-for-web\"},type:{type:ControlType.Enum,title:\"Type\",options:[\"featured\",\"top\",\"review\"],optionTitles:[\"Featured\",\"Top Post Daily\",\"Leave a Review\"],defaultValue:\"featured\"},theme:{type:ControlType.Enum,options:[\"light\",\"dark\"],optionTitles:[\"Light\",\"Dark\"],displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProductHunt\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicHeight\":\"54\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"250\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProductHunt.map"],
  "mappings": "4HAAm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AGC,EAAM,SAAS,CAAeK,EAAK,KAAK,CAAC,MAAMK,EAAgB,SAAS,cAAc,CAAC,EAAgBL,EAAK,IAAI,CAAC,MAAMM,EAAoB,SAAS,sCAAsC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAG,CAAEC,EAAoBjB,EAAY,CAAC,IAAI,CAAC,KAAKkB,EAAY,OAAO,MAAM,MAAM,YAAY,wCAAwC,aAAa,kDAAkD,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,OAAO,QAAQ,CAAC,WAAW,MAAM,QAAQ,EAAE,aAAa,CAAC,WAAW,iBAAiB,gBAAgB,EAAE,aAAa,UAAU,EAAE,MAAM,CAAC,KAAKA,EAAY,KAAK,QAAQ,CAAC,QAAQ,MAAM,EAAE,aAAa,CAAC,QAAQ,MAAM,EAAE,wBAAwB,EAAI,CAAC,CAAC",
  "names": ["emptyStateStyle", "containerStyles", "neutralStateStyle", "stateTitleStyle", "stateParagraphStyle", "BADGES", "productHuntRegex", "ProductHunt", "url", "type", "theme", "style", "props", "badgeUrl", "se", "ref", "id", "p", "motion", "containerStyles", "u", "emptyStateStyle", "stateTitleStyle", "stateParagraphStyle", "addPropertyControls", "ControlType"]
}
