{"version":3,"file":"AppBackButton.rgFj0rye.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/R3iMch99VhXC415wGEyS/WP2P8IsrfiRLx1aF5a8o/AppBackButton.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function AppBackButton(props){const{fallbackPath,top,left,zIndex}=props;const[isHovered,setIsHovered]=React.useState(false);function handleBack(){if(typeof window===\"undefined\")return;const path=window.location.pathname||\"\";// ── Route-specific logic ──\n// Application details → Applications list\nif(path.startsWith(\"/application-details\")){window.location.assign(\"/applications\");return;}// Interview prep result → Interview prep hub\nif(path.startsWith(\"/interview-prep/result\")){window.location.assign(\"/interview-prep\");return;}// Case study result → Case study hub\nif(path.startsWith(\"/case-study/result\")){window.location.assign(\"/case-study\");return;}// Support → go back in history (dynamic)\nif(path.startsWith(\"/support\")){if(window.history.length>1){window.history.back();}else if(fallbackPath){window.location.assign(fallbackPath);}return;}// ── Default fallback ──\nif(window.history.length>1){window.history.back();}else if(fallbackPath){window.location.assign(fallbackPath);}}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",top,left,zIndex,height:56,width:56,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"button\",{onClick:handleBack,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),\"aria-label\":\"Go back\",style:{all:\"unset\",cursor:\"pointer\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"span\",{style:{fontSize:34,lineHeight:1,color:isHovered?\"rgba(17,17,17,0.8)\":\"rgba(17,17,17,0.45)\",transition:\"color 0.15s ease\",transform:\"translateY(-1px)\",userSelect:\"none\"},children:\"←\"})})});}AppBackButton.defaultProps={fallbackPath:\"/dashboard\",top:20,left:72,zIndex:1e3};addPropertyControls(AppBackButton,{fallbackPath:{type:ControlType.String,title:\"Fallback Path\"},top:{type:ControlType.Number,title:\"Top\",min:0,max:200,step:1},left:{type:ControlType.Number,title:\"Left\",min:0,max:200,step:1},zIndex:{type:ControlType.Number,title:\"Z-Index\",min:1,max:9999,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AppBackButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AppBackButton.map"],"mappings":"mLAA2H,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,eAAa,MAAI,OAAK,UAAQ,EAAW,CAAC,EAAU,GAAcA,EAAe,GAAM,CAAC,SAAS,GAAY,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,EAAK,EAAO,SAAS,UAAU,GAEvW,GAAG,EAAK,WAAW,uBAAuB,CAAC,CAAC,EAAO,SAAS,OAAO,gBAAgB,CAAC,OACpF,GAAG,EAAK,WAAW,yBAAyB,CAAC,CAAC,EAAO,SAAS,OAAO,kBAAkB,CAAC,OACxF,GAAG,EAAK,WAAW,qBAAqB,CAAC,CAAC,EAAO,SAAS,OAAO,cAAc,CAAC,OAChF,GAAG,EAAK,WAAW,WAAW,CAAC,CAAI,EAAO,QAAQ,OAAO,EAAG,EAAO,QAAQ,MAAM,CAAU,GAAc,EAAO,SAAS,OAAO,EAAa,CAAE,OAC5I,EAAO,QAAQ,OAAO,EAAG,EAAO,QAAQ,MAAM,CAAU,GAAc,EAAO,SAAS,OAAO,EAAa,CAAG,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,QAAQ,MAAI,OAAK,SAAO,OAAO,GAAG,MAAM,GAAG,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,CAAC,SAAsB,EAAK,SAAS,CAAC,QAAQ,EAAW,iBAAiB,EAAa,GAAK,CAAC,iBAAiB,EAAa,GAAM,CAAC,aAAa,UAAU,MAAM,CAAC,IAAI,QAAQ,OAAO,UAA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