{"version":3,"file":"Breadcrumbs.C7mCDGSb.mjs","names":["React.Fragment","_Fragment"],"sources":["https:/framerusercontent.com/modules/9BgS7g2w9SOUBBbHwFNn/BNJdGBtBP7E5azWWWnKs/Breadcrumbs.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";function prettifySegment(segment,capitalizeLabels){const decoded=decodeURIComponent(segment).replace(/-/g,\" \");if(!capitalizeLabels)return decoded;return decoded.replace(/\\b\\w/g,char=>char.toUpperCase());}export default function Breadcrumbs(props){const{homeLabel,separator,fontFamily,fontSize,fontWeight,linkColor,currentColor,separatorColor,gap,paddingTop,paddingBottom,showHome,capitalizeLabels}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const pathname=typeof window!==\"undefined\"?window.location.pathname:\"/\";const segments=pathname.split(\"/\").filter(Boolean);const crumbs=segments.map((segment,index)=>{const href=\"/\"+segments.slice(0,index+1).join(\"/\");return{href,label:prettifySegment(segment,capitalizeLabels)};});const textStyle={fontFamily,fontSize,fontWeight,lineHeight:1.4,whiteSpace:\"nowrap\"};const containerStyle={display:\"flex\",alignItems:\"center\",flexWrap:\"wrap\",columnGap:gap,rowGap:Math.max(4,gap/2),width:\"100%\",paddingTop,paddingBottom};const linkStyle={...textStyle,color:linkColor,textDecoration:\"none\",cursor:\"pointer\"};const currentStyle={...textStyle,color:currentColor};const separatorStyle={...textStyle,color:separatorColor,opacity:.8};if(isCanvas){return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[showHome&&/*#__PURE__*/_jsx(\"span\",{style:linkStyle,children:homeLabel}),showHome&&crumbs.length>0&&/*#__PURE__*/_jsx(\"span\",{style:separatorStyle,children:separator}),crumbs.length===0?/*#__PURE__*/_jsx(\"span\",{style:currentStyle,children:homeLabel}):crumbs.map((crumb,index)=>{const isLast=index===crumbs.length-1;return /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(\"span\",{style:isLast?currentStyle:linkStyle,children:crumb.label}),!isLast&&/*#__PURE__*/_jsx(\"span\",{style:separatorStyle,children:separator})]},crumb.href);})]});}return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":\"Breadcrumb\",style:containerStyle,children:[showHome&&/*#__PURE__*/_jsx(_Fragment,{children:crumbs.length===0?/*#__PURE__*/_jsx(\"span\",{style:currentStyle,children:homeLabel}):/*#__PURE__*/_jsx(\"a\",{href:\"/\",style:linkStyle,children:homeLabel})}),showHome&&crumbs.length>0&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:separatorStyle,children:separator}),crumbs.map((crumb,index)=>{const isLast=index===crumbs.length-1;return /*#__PURE__*/_jsxs(React.Fragment,{children:[isLast?/*#__PURE__*/_jsx(\"span\",{\"aria-current\":\"page\",style:currentStyle,children:crumb.label}):/*#__PURE__*/_jsx(\"a\",{href:crumb.href,style:linkStyle,children:crumb.label}),!isLast&&/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:separatorStyle,children:separator})]},crumb.href);})]});}Breadcrumbs.defaultProps={homeLabel:\"Home\",separator:\"/\",fontFamily:\"Inter\",fontSize:14,fontWeight:500,linkColor:\"#666666\",currentColor:\"#111111\",separatorColor:\"#999999\",gap:8,paddingTop:0,paddingBottom:0,showHome:true,capitalizeLabels:true};addPropertyControls(Breadcrumbs,{homeLabel:{type:ControlType.String,title:\"Home Label\",defaultValue:\"Home\"},separator:{type:ControlType.String,title:\"Separator\",defaultValue:\"/\"},fontFamily:{type:ControlType.String,title:\"Font\",defaultValue:\"Inter\"},fontSize:{type:ControlType.Number,title:\"Size\",defaultValue:14,min:8,max:48,unit:\"px\",step:1},fontWeight:{type:ControlType.Number,title:\"Weight\",defaultValue:500,min:100,max:900,step:100},linkColor:{type:ControlType.Color,title:\"Link Color\",defaultValue:\"#666666\"},currentColor:{type:ControlType.Color,title:\"Current Color\",defaultValue:\"#111111\"},separatorColor:{type:ControlType.Color,title:\"Sep Color\",defaultValue:\"#999999\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,max:40,unit:\"px\",step:1},paddingTop:{type:ControlType.Number,title:\"Top Pad\",defaultValue:0,min:0,max:100,unit:\"px\",step:1},paddingBottom:{type:ControlType.Number,title:\"Bottom Pad\",defaultValue:0,min:0,max:100,unit:\"px\",step:1},showHome:{type:ControlType.Boolean,title:\"Show Home\",defaultValue:true},capitalizeLabels:{type:ControlType.Boolean,title:\"Capitalize\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Breadcrumbs\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Breadcrumbs.map"],"mappings":"6MAA4K,SAAS,EAAgB,EAAQ,EAAiB,CAAC,IAAM,EAAQ,mBAAmB,EAAQ,CAAC,QAAQ,KAAK,IAAI,CAAqC,OAAhC,EAAuC,EAAQ,QAAQ,QAAQ,GAAM,EAAK,aAAa,CAAC,CAAhE,EAAkE,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,YAAU,YAAU,aAAW,WAAS,aAAW,YAAU,eAAa,iBAAe,MAAI,aAAW,gBAAc,WAAS,oBAAkB,EAAY,EAAS,EAAa,SAAS,GAAG,EAAa,OAAqF,GAAxD,IAAS,OAAqC,IAAzB,EAAO,SAAS,UAAqC,MAAM,IAAI,CAAC,OAAO,QAAQ,CAAO,EAAO,EAAS,KAAK,EAAQ,KAAkE,CAAC,KAA/C,IAAI,EAAS,MAAM,EAAE,EAAM,EAAE,CAAC,KAAK,IAAI,CAAa,MAAM,EAAgB,EAAQ,EAAiB,CAAC,EAAG,CAAO,EAAU,CAAC,aAAW,WAAS,aAAW,WAAW,IAAI,WAAW,SAAS,CAAO,EAAe,CAAC,QAAQ,OAAO,WAAW,SAAS,SAAS,OAAO,UAAU,EAAI,OAAO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