{"version":3,"file":"BackButton.1VWe1f2s.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/NJ8DSnZKKJbfynVmc7Gn/b5RaLH6U7zD4hw8C94P9/BackButton.js"],"sourcesContent":["// Back Button component that navigates to the previous page\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useCallback,startTransition}from\"react\";/**\n * Back Button\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function BackButton(props){const{label,background,color,borderRadius,font,style,link,page}=props;const handleClick=useCallback(()=>{if(page){if(typeof window!==\"undefined\"){startTransition(()=>window.location.assign(page));}}else if(link){if(typeof window!==\"undefined\"){startTransition(()=>window.location.assign(link));}}else if(typeof window!==\"undefined\"&&window.history.length>1){startTransition(()=>window.history.back());}},[link,page]);return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Go back\",onClick:handleClick,style:{...style,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:0,background:\"none\",color,border:\"none\",borderRadius,padding:10,cursor:\"pointer\",boxShadow:\"none\",transition:\"background 0.15s, color 0.15s\",...font},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 20 20\",fill:\"none\",\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M12.5 15L7.5 10L12.5 5\",stroke:color,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})});}addPropertyControls(BackButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Back\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},link:{type:ControlType.String,title:\"Link (optional)\",defaultValue:\"\",placeholder:\"https://...\"},page:{type:ControlType.String,title:\"Page\",defaultValue:\"\",placeholder:\"/about, /contact, etc.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackButton.map"],"mappings":"iTAMG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,aAAW,QAAM,eAAa,OAAK,QAAM,OAAK,QAAM,EAAY,EAAYA,MAAgB,CAAI,EAAgB,IAAS,QAAa,MAAoB,EAAO,SAAS,OAAO,EAAK,CAAC,CAAW,EAAgB,IAAS,QAAa,MAAoB,EAAO,SAAS,OAAO,EAAK,CAAC,CAAkB,IAAS,QAAa,EAAO,QAAQ,OAAO,GAAG,MAAoB,EAAO,QAAQ,MAAM,CAAC,EAAI,CAAC,EAAK,EAAK,CAAC,CAAC,OAAoB,EAAK,SAAS,CAAC,KAAK,SAAS,aAAa,UAAU,QAAQ,EAAY,MAAM,CAAC,GAAG,EAAM,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,IAAI,EAAE,WAAW,OAAO,QAAM,OAAO,OAAO,eAAa,QAAQ,GAAG,OAAO,UAAU,UAAU,OAAO,WAAW,gCAAgC,GAAG,EAAK,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,cAAc,OAAO,SAAsB,EAAK,OAAO,CAAC,EAAE,yBAAyB,OAAO,EAAM,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,sBALt+B,IAAoD,IAA+C,CAKq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