{"version":3,"file":"GoBack.D9drVaIn.mjs","names":["React.useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/wbP84VggLmMBBZenUosd/2OvcDWkFVk6QlcQ03AHs/GoBack.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerIntrinsicWidth 300\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth 100%\n * @framerSupportedLayoutHeight 100%\n */export default function GoBack(props){const goBackOrFallback=React.useCallback(()=>{if(window.history.length>1){window.history.back();}else{window.location.href=props.fallbackUrl;}},[props.fallbackUrl]);const content=React.Children.count(props.children)>0?React.Children.map(props.children,child=>/*#__PURE__*/React.cloneElement(child,{onClick:goBackOrFallback,style:{...child.props.style,cursor:\"pointer\"}})):/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",height:\"100%\",width:\"100%\",padding:\"24px\",boxSizing:\"border-box\",backgroundColor:\"#8658d833\",border:\"1px solid #8658D8\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"60\",height:\"40\",viewBox:\"0 0 317 158\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{\"fill-rule\":\"evenodd\",\"clip-rule\":\"evenodd\",d:\"M.559 41.016c0-22.644 18.356-41 41-41h233.5c22.643 0 41 18.356 41 41v75.75c0 22.643-18.357 41-41 41h-233.5c-22.644 0-41-18.357-41-41zm41-34h233.5c18.777 0 34 15.222 34 34v75.75c0 18.777-15.223 34-34 34h-233.5c-18.778 0-34-15.223-34-34v-75.75c0-18.778 15.222-34 34-34\",fill:\"#9A66FF\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M101.3 75.283H65.02l11.937-11.936a3.629 3.629 0 1 0-5.116-5.151l-15.564 15.6a7.26 7.26 0 0 0-2.14 5.115 7.26 7.26 0 0 0 2.14 5.08l15.564 15.6a3.63 3.63 0 0 0 5.116-5.152l-11.936-11.9H101.3a3.627 3.627 0 0 0 0-7.256m30.262 24.61V57.71h15.448q4.49 0 7.435 1.483 2.945 1.462 4.408 3.975 1.462 2.492 1.462 5.623 0 2.636-.968 4.449a8 8 0 0 1-2.595 2.883 11.4 11.4 0 0 1-3.543 1.566v.411q2.101.103 4.099 1.36 2.018 1.236 3.336 3.522 1.319 2.287 1.319 5.56 0 3.235-1.524 5.81-1.504 2.553-4.655 4.057-3.152 1.482-8.054 1.483zm6.364-5.459h9.187q4.572 0 6.549-1.77 1.978-1.773 1.978-4.43a6.95 6.95 0 0 0-1.01-3.665q-1.01-1.668-2.883-2.657-1.854-.99-4.408-.989h-9.413zm0-18.475h8.527q2.142 0 3.852-.824 1.73-.824 2.739-2.306 1.03-1.504 1.03-3.543 0-2.616-1.833-4.387t-5.623-1.771h-8.692zm40.298 24.634q-3.008 0-5.438-1.112-2.43-1.133-3.851-3.275-1.401-2.142-1.401-5.252 0-2.678 1.03-4.408a7.6 7.6 0 0 1 2.78-2.74q1.752-1.008 3.914-1.523a39 39 0 0 1 4.407-.783l4.614-.536q1.771-.226 2.575-.72.803-.495.803-1.607v-.144q0-2.699-1.524-4.181-1.504-1.483-4.49-1.483-3.111 0-4.902 1.38-1.771 1.359-2.451 3.027l-5.788-1.318q1.03-2.883 3.007-4.655a12.2 12.2 0 0 1 4.593-2.595q2.595-.825 5.458-.824 1.895 0 4.017.453 2.142.433 3.995 1.607 1.875 1.174 3.069 3.357 1.195 2.163 1.195 5.623v21.009h-6.014v-4.326h-.247q-.598 1.196-1.792 2.348-1.196 1.154-3.069 1.916-1.874.762-4.49.762m1.338-4.943q2.555 0 4.367-1.01 1.833-1.008 2.78-2.636a6.83 6.83 0 0 0 .969-3.522v-4.078q-.33.33-1.277.618-.928.267-2.122.474-1.194.185-2.327.35-1.134.144-1.895.247a15.3 15.3 0 0 0-3.275.762q-1.463.535-2.348 1.545-.865.989-.865 2.636 0 2.287 1.689 3.46 1.69 1.154 4.304 1.154m35.802 4.881q-4.593 0-7.909-2.08-3.296-2.1-5.066-5.788-1.772-3.687-1.772-8.444 0-4.82 1.813-8.507 1.812-3.706 5.108-5.788 3.295-2.08 7.765-2.08 3.604 0 6.426 1.34 2.821 1.317 4.552 3.706 1.75 2.39 2.08 5.582h-5.994q-.494-2.225-2.265-3.83-1.751-1.608-4.696-1.607-2.575 0-4.511 1.359-1.915 1.339-2.986 3.831-1.072 2.472-1.072 5.85 0 3.46 1.051 5.972 1.05 2.514 2.966 3.893 1.936 1.38 4.552 1.38 1.75 0 3.172-.638a6.5 6.5 0 0 0 2.409-1.875q.989-1.215 1.38-2.924h5.994q-.33 3.069-1.998 5.478-1.668 2.41-4.469 3.79-2.78 1.38-6.53 1.38m25.247-11.369-.041-7.518h1.071l12.605-13.388h7.373l-14.376 15.242h-.968zm-5.664 10.73v-42.18h6.158v42.182zm19.978 0-11.328-15.035 4.243-4.305 14.644 19.34z\",fill:\"#9A66FF\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"8px\",color:\"#8658D8\",fontWeight:\"normal\",fontSize:\"12px\",fontFamily:\"Inter, sans-serif\",textAlign:\"center\",width:\"300px\"},children:\"Style your button and connect it to the component to convert it to a back button.\"})]});return /*#__PURE__*/_jsx(_Fragment,{children:content});}GoBack.defaultProps={height:50,width:200,fallbackUrl:\"\"};addPropertyControls(GoBack,{children:{type:ControlType.ComponentInstance,title:\"Button\",description:\"Back function does not work in canvas, only on live website\"},fallbackUrl:{type:ControlType.String,title:\"Fallback URL\",description:\"URL to redirect to if there is no previous page to go back to.\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GoBack\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutWidth\":\"100%\",\"framerIntrinsicWidth\":\"300\",\"framerI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