{"version":3,"file":"RecentPosts.DHf4dcN6.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","p","c","init_jsx_runtime","ce","de","RenderTarget","init_framer_B1b760uK","addPropertyControls","ControlType","RecentPosts","placeholderRef","isOnCanvas","scriptInjected","script","props","init_RecentPosts"],"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":"A,gMAAuL,SAAwBY,EAAY,EAAM,CAAC,IAAMC,EAAeb,EAAO,IAAI,EAAQc,EAAWN,EAAa,QAAQ,IAAIA,EAAa,OAAmW,OAA5VF,MAAc,CAAC,GAAIS,EAAyN,IAAI,kBAAkB,MAAhO,CAAC,IAAMC,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,IAAI,iDAAiDC,EAAM,MAAM,KAAK,EAAO,MAAM,GAAK,SAAS,KAAK,YAAYD,CAAM,EAAE,EAAe,EAAK,CAA+B,EAAE,CAACF,EAAWG,EAAM,MAAMA,EAAM,cAAcA,EAAM,YAAYA,EAAM,cAAc,CAAC,EAAsB,gBAAK,MAAM,CAAC,UAAU,8BAA8B,IAAIJ,EAAe,yBAAyB,GAAK,iBAAiBI,EAAM,cAAc,eAAeA,EAAM,YAAY,kBAAkBA,EAAM,eAAe,SAASH,GAAY,CAACG,EAAM,OAAoB,gBAAK,MAAM,CAAC,MAAM,CAAC,OAAO,SAAS,MAAM,OAAO,SAAS,OAAO,EAAE,SAAsB,gBAAM,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,OAAO,EAAE,SAAS,aAAa,UAAU,SAAS,WAAW,OAAO,EAAE,SAAS,CAAC,gFAA6F,gBAAK,SAAS,CAAC,SAAS,eAAe,CAAC,EAAE,IAAI,+BAA+B,CAAC,CAAC,CAAC,CAAC,CAAC,CA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