{"version":3,"file":"Blog_Category_Carousel.C7_a4ea8.mjs","names":["useRef","useState","useCallback","__esmMin","init_ssg_sandbox_shims","ne","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","window","init_framer_BisrWwwE","ControlType","addPropertyControls","ChevronLeft","color","ChevronRight","getActiveCategorySlug","match","Blog_Category_Carousel","props","scrollerRef","activeRef","canLeft","setCanLeft","canRight","setCanRight","activeSlug","setActiveSlug","updateArrows","el","max","activeEl","scroller","activeCenter","target","scrollByDir","amount","dir","style","arrowColor","arrowMutedColor","CATEGORIES","isActive","cat","activeTextColor","textColor","init_Blog_Category_Carousel","\"s\"","\"n\""],"sources":["https:/framerusercontent.com/modules/p4DBbRcdKXzvYrSI9ZD0/Cwo9o8ffF43GsP5GtVQR/Blog_Category_Carousel.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useCallback,useEffect,useRef,useState}from\"react\";const CATEGORIES=[{\"s\":\"accounting\",\"n\":\"Accounting\"},{\"s\":\"business-operations\",\"n\":\"Business & Operations\"},{\"s\":\"competitor-series\",\"n\":\"Competitor Series\"},{\"s\":\"events\",\"n\":\"Events\"},{\"s\":\"evictions\",\"n\":\"Evictions\"},{\"s\":\"feature-highlights\",\"n\":\"Features\"},{\"s\":\"guides\",\"n\":\"Guides\"},{\"s\":\"how-to-grow-your-portfolio-like-a-pro\",\"n\":\"How to Build a Rental Property Portfolio\"},{\"s\":\"how-to-start-smart-managing-rentals\",\"n\":\"How to Manage a Rental Property: Basics for Landlords\"},{\"s\":\"industry-pulse\",\"n\":\"Industry Pulse\"},{\"s\":\"real-estate-investing-tips-for-beginners\",\"n\":\"Investor Spotlight\"},{\"s\":\"landlord-tenant-laws\",\"n\":\"Landlord Tenant Laws\"},{\"s\":\"how-to-be-legal-wise\",\"n\":\"Landlord-Tenant Law Guides by State\"},{\"s\":\"leases\",\"n\":\"Leases\"},{\"s\":\"maintenance-improvements\",\"n\":\"Maintenance & Improvements\"},{\"s\":\"marketing-rentals\",\"n\":\"Marketing & Listing Rentals\"},{\"s\":\"monthly-rental-performance-reports\",\"n\":\"Monthly Rental Performance Reports\"},{\"s\":\"podcasts\",\"n\":\"Podcasts\"},{\"s\":\"press\",\"n\":\"Press\"},{\"s\":\"property-management\",\"n\":\"Property Management\"},{\"s\":\"property-management-software\",\"n\":\"Property Management Software\"},{\"s\":\"real-estate-investing\",\"n\":\"Real Estate Investing\"},{\"s\":\"rent-collection\",\"n\":\"Rent Collection\"},{\"s\":\"rental-inspections\",\"n\":\"Rental Inspections\"},{\"s\":\"how-to-be-data-wise\",\"n\":\"Rental Market Data & Trends for Landlords\"},{\"s\":\"rental-market-insights\",\"n\":\"Rental Market Insights\"},{\"s\":\"templates\",\"n\":\"Templates\"},{\"s\":\"tenant-management\",\"n\":\"Tenant Management\"},{\"s\":\"tenant-screening\",\"n\":\"Tenant Screening\"},{\"s\":\"tenants\",\"n\":\"Tenants\"},{\"s\":\"whats-new-with-rentredi\",\"n\":\"What's New with RentRedi\"}];function ChevronLeft({color}){return /*#__PURE__*/_jsx(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 6L9 12L15 18\",stroke:color,strokeWidth:\"2.25\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}function ChevronRight({color}){return /*#__PURE__*/_jsx(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 6L15 12L9 18\",stroke:color,strokeWidth:\"2.25\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});}function getActiveCategorySlug(){if(typeof window===\"undefined\")return null;const match=window.location.pathname.match(/\\/blog\\/category\\/([^/?#]+)/);return match?decodeURIComponent(match[1]):null;}/**\n * Single-line horizontal category carousel with real <a href> links.\n * Highlights the current category when on /blog/category/{slug}.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 1000\n * @framerIntrinsicHeight 48\n */export default function Blog_Category_Carousel(props){const{textColor=\"rgb(26, 58, 92)\",activeTextColor=\"rgb(26, 58, 92)\",arrowColor=\"rgb(26, 58, 92)\",arrowMutedColor=\"rgb(180, 190, 200)\",gap=36,style}=props;const scrollerRef=useRef(null);const activeRef=useRef(null);const[canLeft,setCanLeft]=useState(false);const[canRight,setCanRight]=useState(true);const[activeSlug,setActiveSlug]=useState(null);const updateArrows=useCallback(()=>{const el=scrollerRef.current;if(!el)return;const max=el.scrollWidth-el.clientWidth;setCanLeft(el.scrollLeft>2);setCanRight(el.scrollLeft<max-2);},[]);useEffect(()=>{setActiveSlug(getActiveCategorySlug());},[]);useEffect(()=>{const el=scrollerRef.current;if(!el)return;updateArrows();el.addEventListener(\"scroll\",updateArrows,{passive:true});if(typeof window!==\"undefined\"){window.addEventListener(\"resize\",updateArrows);}return()=>{el.removeEventListener(\"scroll\",updateArrows);if(typeof window!==\"undefined\"){window.removeEventListener(\"resize\",updateArrows);}};},[updateArrows]);useEffect(()=>{const activeEl=activeRef.current;const scroller=scrollerRef.current;if(!activeEl||!scroller)return;const activeCenter=activeEl.offsetLeft+activeEl.offsetWidth/2;const target=Math.max(0,activeCenter-scroller.clientWidth/2);scroller.scrollTo({left:target,behavior:\"auto\"});updateArrows();},[activeSlug,updateArrows]);const scrollByDir=dir=>{const el=scrollerRef.current;if(!el)return;const amount=Math.max(240,Math.floor(el.clientWidth*.7));el.scrollBy({left:dir*amount,behavior:\"smooth\"});};return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Blog categories\",style:{width:\"100%\",position:\"relative\",display:\"flex\",alignItems:\"center\",gap:8,fontFamily:'Inter, \"Inter Placeholder\", system-ui, -apple-system, sans-serif',...style},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Scroll categories left\",onClick:()=>scrollByDir(-1),disabled:!canLeft,style:{flex:\"0 0 auto\",width:32,height:32,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",border:\"none\",background:\"transparent\",cursor:canLeft?\"pointer\":\"default\",padding:0,opacity:canLeft?1:.55},children:/*#__PURE__*/_jsx(ChevronLeft,{color:canLeft?arrowColor:arrowMutedColor})}),/*#__PURE__*/_jsx(\"style\",{children:`\n                [data-rr-cat-carousel]::-webkit-scrollbar { display: none; }\n            `}),/*#__PURE__*/_jsx(\"div\",{ref:scrollerRef,\"data-rr-cat-carousel\":true,style:{flex:\"1 1 auto\",overflowX:\"auto\",overflowY:\"hidden\",WebkitOverflowScrolling:\"touch\",scrollbarWidth:\"none\",msOverflowStyle:\"none\"},children:/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"row\",flexWrap:\"nowrap\",alignItems:\"center\",gap,width:\"max-content\",padding:\"10px 4px\"},children:CATEGORIES.map(cat=>{const isActive=activeSlug===cat.s;return /*#__PURE__*/_jsx(\"a\",{ref:isActive?activeRef:undefined,href:`/blog/category/${cat.s}`,\"aria-current\":isActive?\"page\":undefined,style:{flex:\"0 0 auto\",whiteSpace:\"nowrap\",textDecoration:\"none\",color:isActive?activeTextColor:textColor,fontWeight:isActive?800:700,fontSize:15,lineHeight:1.2,borderBottom:isActive?`2px solid ${activeTextColor}`:\"2px solid transparent\",paddingBottom:2},children:cat.n},cat.s);})})}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Scroll categories right\",onClick:()=>scrollByDir(1),disabled:!canRight,style:{flex:\"0 0 auto\",width:32,height:32,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",border:\"none\",background:\"transparent\",cursor:canRight?\"pointer\":\"default\",padding:0,opacity:canRight?1:.55},children:/*#__PURE__*/_jsx(ChevronRight,{color:canRight?arrowColor:arrowMutedColor})})]});}addPropertyControls(Blog_Category_Carousel,{textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"rgb(26, 58, 92)\"},activeTextColor:{type:ControlType.Color,title:\"Active Text\",defaultValue:\"rgb(26, 58, 92)\"},arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"rgb(26, 58, 92)\"},arrowMutedColor:{type:ControlType.Color,title:\"Arrow Muted\",defaultValue:\"rgb(180, 190, 200)\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:36,min:12,max:64,step:2}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Blog_Category_Carousel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"48\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"1000\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Blog_Category_Carousel.map"],"mappings":"A,oNAAgzD,SAASiB,EAAY,CAAC,SAAO,CAAC,MAAoB,gBAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,cAAc,OAAO,SAAsB,gBAAK,OAAO,CAAC,EAAE,mBAAmB,OAAOC,EAAM,YAAY,OAAO,cAAc,QAAQ,eAAe,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC,SAASC,EAAa,CAAC,SAAO,CAAC,MAAoB,gBAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,cAAc,OAAO,SAAsB,gBAAK,OAAO,CAAC,EAAE,kBAAkB,OAAOD,EAAM,YAAY,OAAO,cAAc,QAAQ,eAAe,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC,SAASE,GAAuB,CAAC,GAAUP,IAAS,OAAY,OAAO,KAAK,IAAMQ,EAAMR,EAAO,SAAS,SAAS,MAAM,6BAA6B,EAAE,OAAOQ,EAAM,mBAAmBA,EAAM,EAAE,EAAE,IAAK,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