{"version":3,"file":"BackButton.CpDwpQR2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/MwEWP5PvtxaLsOKtXEh7/1a8Mf3mUZHiBR4A3MOvx/BackButton.js"],"sourcesContent":["// BackButton component - navigates back in browser history on click\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function BackButton(props){const{label,font,textColor,backgroundColor,padding,borderRadius,borderColor,borderWidth,showIcon,iconSize,iconPosition,iconGap,navigationMode,sectionId,scrollBehavior}=props;const handleClick=()=>{if(typeof window===\"undefined\")return;if(navigationMode===\"section\"&&sectionId){const target=document.getElementById(sectionId);if(target){target.scrollIntoView({behavior:scrollBehavior||\"smooth\",block:\"start\"});return;}}window.history.back();};const ArrowIcon=()=>/*#__PURE__*/_jsx(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",style:{flexShrink:0},children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 18L9 12L15 6\",stroke:textColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})});return /*#__PURE__*/_jsxs(\"button\",{onClick:handleClick,style:{position:\"relative\",...font,color:textColor,backgroundColor,padding,borderRadius,border:`${borderWidth}px solid ${borderColor}`,cursor:\"pointer\",outline:\"none\",width:\"max-content\",display:\"flex\",alignItems:\"center\",gap:showIcon?`${iconGap}px`:0,flexDirection:iconPosition===\"right\"?\"row-reverse\":\"row\"},children:[showIcon&&/*#__PURE__*/_jsx(ArrowIcon,{}),label]});}addPropertyControls(BackButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Back\"},navigationMode:{type:ControlType.Enum,title:\"Navigate To\",options:[\"history\",\"section\"],optionTitles:[\"Previous Page\",\"Section\"],defaultValue:\"history\",displaySegmentedControl:true},sectionId:{type:ControlType.String,title:\"Section ID\",defaultValue:\"\",placeholder:\"e.g. contact\",hidden:({navigationMode})=>navigationMode!==\"section\"},scrollBehavior:{type:ControlType.Enum,title:\"Scroll\",options:[\"smooth\",\"auto\"],optionTitles:[\"Smooth\",\"Instant\"],defaultValue:\"smooth\",hidden:({navigationMode})=>navigationMode!==\"section\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"transparent\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"12px 24px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"8px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"transparent\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:0,min:0,max:20,step:1,unit:\"px\"},showIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:20,min:12,max:48,step:1,unit:\"px\",hidden:({showIcon})=>!showIcon},iconPosition:{type:ControlType.Enum,title:\"Icon Position\",options:[\"left\",\"right\"],optionTitles:[\"Left\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true,hidden:({showIcon})=>!showIcon},iconGap:{type:ControlType.Number,title:\"Icon Gap\",defaultValue:8,min:0,max:32,step:1,unit:\"px\",hidden:({showIcon})=>!showIcon}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackButton.map"],"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