{"version":3,"file":"BackButton.BphM7JWm.mjs","names":["useState","useCallback"],"sources":["https:/framerusercontent.com/modules/5ROHJnJQrEcE0Y3TUk2G/SwDGwQpswJeKC4kTP1Xv/BackButton.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useCallback}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * Back Button\n * \n * A button that navigates to the previous page with an animated arrow.\n * \n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function BackButton(props){const{label,backgroundColor,textColor,arrowColor,borderRadius,fontSize,padding,showLabel,style}=props;const[isHovered,setIsHovered]=useState(false);const[isPressed,setIsPressed]=useState(false);const handleClick=useCallback(()=>{if(typeof window!==\"undefined\"){window.history.back();}},[]);return /*#__PURE__*/_jsxs(motion.button,{style:{position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:8,backgroundColor,color:textColor,border:\"none\",borderRadius,padding:padding,fontSize,fontWeight:500,cursor:\"pointer\",outline:\"none\",...style},whileHover:{scale:1.02},whileTap:{scale:.98},onClick:handleClick,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),onMouseDown:()=>setIsPressed(true),onMouseUp:()=>setIsPressed(false),\"aria-label\":showLabel?label:\"Go back\",children:[/*#__PURE__*/_jsx(motion.div,{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},animate:{x:isHovered||isPressed?-3:0},transition:{type:\"spring\",stiffness:500,damping:30},children:/*#__PURE__*/_jsx(\"svg\",{width:fontSize*1.2,height:fontSize,viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M19 12H5M5 12L12 19M5 12L12 5\",stroke:arrowColor,strokeWidth:\"3\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})}),showLabel&&/*#__PURE__*/_jsx(\"span\",{children:label})]});}addPropertyControls(BackButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Back\"},showLabel:{type:ControlType.Boolean,title:\"Show Label\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#f5f5f5\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#333333\"},arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"#333333\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:50,step:1},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:10,max:32,step:1},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:12,min:4,max:32,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackButton.map"],"mappings":"uPAOG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,kBAAgB,YAAU,aAAW,eAAa,WAAS,UAAQ,YAAU,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAYC,MAAgB,CAAW,IAAS,QAAa,EAAO,QAAQ,MAAM,EAAI,EAAE,CAAC,CAAC,OAAoB,EAAM,EAAO,OAAO,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,IAAI,EAAE,kBAAgB,MAAM,EAAU,OAAO,OAAO,eAAqB,UAAQ,WAAS,WAAW,IAAI,OAAO,UAAU,QAAQ,OAAO,GAAG,EAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAY,iBAAiB,E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