{"version":3,"file":"RecentPosts.DXguK4EA.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/Hh6G24HvqUNy9FEj3tTr/UW1UtxpE0MR9JuDekoN7/RecentPosts.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{RenderTarget,addPropertyControls,ControlType}from\"framer\";let scriptInjected=false;export default function RecentPosts(props){const placeholderRef=useRef(null);const isOnCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(!scriptInjected){const script=document.createElement(\"script\");script.src=`https://io.dropinblog.com/embedjs/recentposts/${props.dibid}.js`;script.async=true;document.body.appendChild(script);scriptInjected=true;}else{dib.reloadRecentPosts();}},[isOnCanvas,props.dibid,props.dib_num_posts,props.dib_display,props.dib_categories]);return /*#__PURE__*/_jsx(\"div\",{className:\"dib-recent-widget-container\",ref:placeholderRef,suppressHydrationWarning:true,\"data-num-posts\":props.dib_num_posts,\"data-display\":props.dib_display,\"data-categories\":props.dib_categories,children:isOnCanvas&&!props.dibid&&/*#__PURE__*/_jsx(\"div\",{style:{margin:\"0 auto\",width:\"100%\",maxWidth:\"500px\"},children:/*#__PURE__*/_jsxs(\"p\",{style:{fontSize:18,margin:0,wordWrap:\"break-word\",textAlign:\"center\",lineHeight:\"1.5em\"},children:[\"Please add your DropInBlog ID to display your blog posts. Find your ID under \",/*#__PURE__*/_jsx(\"strong\",{children:\"Code & Layout\"}),\" \",\"in your DropInBlog dashboard.\"]})})});}RecentPosts.defaultProps={dibid:\"\",dib_num_posts:\"3\",dib_display:\"2\",dib_categories:\"\"};addPropertyControls(RecentPosts,{dibid:{type:ControlType.String,title:\"Blog ID\"},dib_num_posts:{type:ControlType.String,title:\"Number of Posts\"},dib_display:{type:ControlType.Enum,title:\"Display as\",defaultValue:\"2\",displaySegmentedControl:true,segmentedControlDirection:\"horizontal\",options:[\"2\",\"1\"],optionTitles:[\"Posts\",\"Lists\"]},dib_categories:{type:ControlType.String,title:\"Categories\",placeholder:\"category-slug, another-slug\",description:\"Filter by category slugs (comma-separated)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RecentPosts\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RecentPosts.map"],"mappings":"0LAAuL,SAAwB,EAAY,EAAM,CAAC,IAAM,EAAeA,EAAO,KAAK,CAAO,EAAW,EAAa,SAAS,GAAG,EAAa,OAAmW,OAA5V,MAAc,CAAC,GAAI,EAAyN,IAAI,mBAAmB,KAAjO,CAAC,IAAM,EAAO,SAAS,cAAc,SAAS,CAAC,EAAO,IAAI,iDAAiD,EAAM,MAAM,KAAK,EAAO,MAAM,GAAK,SAAS,KAAK,YAAY,EAAO,CAAC,EAAe,KAAsC,CAAC,EAAW,EAAM,MAAM,EAAM,cAAc,EAAM,YAAY,EAAM,eAAe,CAAC,CAAqB,EAAK,MAAM,CAAC,UAAU,8BAA8B,IAAI,EAAe,yBAAyB,GAAK,iBAAiB,EAAM,cAAc,eAAe,EAAM,YAAY,kBAAkB,EAAM,eAAe,SAAS,GAAY,CAAC,EAAM,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,OAAO,SAAS,MAAM,OAAO,SAAS,QAAQ,CAAC,SAAsB,EAAM,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,aAAa,UAAU,SAAS,WAAW,QAAQ,CAAC,SAAS,CAAC,gFAA6F,EAAK,SAAS,CAAC,SAAS,gBAAgB,CAAC,CAAC,IAAI,gCAAgC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,oBAAlvC,IAAoC,IAAiE,CAAI,EAAe,GAA4nC,EAAY,aAAa,CAAC,MAAM,GAAG,cAAc,IAAI,YAAY,IAAI,eAAe,GAAG,CAAC,EAAoB,EAAY,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,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