{"version":3,"file":"MobileBrochureButton.CQnPORXf.mjs","names":["React.useState","React.useCallback","__esmMin","window","te","init_ssg_sandbox_shims","init_npm_react_18_3_1","_e","ne","p","init_jsx_runtime","ce","addPropertyControls","ControlType","init_framer_Bf4_tcb2","MobileBrochureButton","props","isCollapsed","setIsCollapsed","prefersReducedMotion","setPrefersReducedMotion","isFocusVisible","setIsFocusVisible","mediaQuery","handleMotionPreferenceChange","collapseIfScrolled","handleScroll","handleClick","onOpen","transitionValue","buttonWidth","style","label","foreground","labelFont","init_MobileBrochureButton"],"sources":["https:/framerusercontent.com/modules/DQrgksKOayDoBlHAQmCO/Nz3Y4WUKMbQBFJyjPVWn/MobileBrochureButton.js"],"sourcesContent":["// User request: Create Framer code component MobileBrochureButton.tsx for /mentors-2 mobile usage, expanded \"Download Brochure\" button on arrival that collapses to icon-only after scrollY > 24 and stays collapsed for the visit, with onOpen event handler, configurable label/background/foreground, SSR-safe scroll handling, reduced-motion-aware width transition, and no fixed positioning inside component.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 192\n * @framerIntrinsicHeight 44\n */export default function MobileBrochureButton(props){const{label=\"Download Brochure\",background=\"#1F7D57\",foreground=\"#FFFFFF\",onOpen,labelFont,style}=props;const[isCollapsed,setIsCollapsed]=React.useState(false);const[prefersReducedMotion,setPrefersReducedMotion]=React.useState(false);const[isFocusVisible,setIsFocusVisible]=React.useState(false);React.useEffect(()=>{if(typeof window===\"undefined\")return;const mediaQuery=window.matchMedia(\"(prefers-reduced-motion: reduce)\");React.startTransition(()=>{setPrefersReducedMotion(mediaQuery.matches);});const handleMotionPreferenceChange=()=>{React.startTransition(()=>{setPrefersReducedMotion(mediaQuery.matches);});};if(typeof mediaQuery.addEventListener===\"function\"){mediaQuery.addEventListener(\"change\",handleMotionPreferenceChange);return()=>mediaQuery.removeEventListener(\"change\",handleMotionPreferenceChange);}mediaQuery.addListener(handleMotionPreferenceChange);return()=>mediaQuery.removeListener(handleMotionPreferenceChange);},[]);React.useEffect(()=>{if(typeof window===\"undefined\")return;const collapseIfScrolled=()=>{if(window.scrollY>24){React.startTransition(()=>{setIsCollapsed(true);});return true;}return false;};if(collapseIfScrolled())return;const handleScroll=()=>{if(collapseIfScrolled()){window.removeEventListener(\"scroll\",handleScroll);}};window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>{window.removeEventListener(\"scroll\",handleScroll);};},[]);const handleClick=React.useCallback(()=>{if(!onOpen)return;onOpen();},[onOpen]);const transitionValue=prefersReducedMotion?\"none\":\"width 180ms ease\";const buttonWidth=isCollapsed?44:192;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",display:\"inline-block\",...style,width:\"auto\",height:\"auto\"},children:/*#__PURE__*/_jsxs(\"button\",{type:\"button\",\"aria-label\":label,onClick:handleClick,onFocus:()=>{React.startTransition(()=>{setIsFocusVisible(true);});},onBlur:()=>{React.startTransition(()=>{setIsFocusVisible(false);});},style:{width:buttonWidth,height:44,border:\"none\",borderRadius:999,background,color:foreground,cursor:\"pointer\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:isCollapsed?0:8,padding:isCollapsed?0:\"0 16px\",whiteSpace:\"nowrap\",overflow:\"hidden\",transition:transitionValue,WebkitTapHighlightColor:\"transparent\",outline:\"none\",boxShadow:isFocusVisible?`0 0 0 2px ${foreground}`:\"none\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-hidden\":\"true\",focusable:\"false\",style:{flex:\"0 0 auto\"},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M12 7C9.5 4.5 5.5 4 2 5V19C5.5 18 9.5 18.5 12 21\",stroke:\"currentColor\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 7C14.5 4.5 18.5 4 22 5V19C18.5 18 14.5 18.5 12 21\",stroke:\"currentColor\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 7V21\",stroke:\"currentColor\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})]}),!isCollapsed?/*#__PURE__*/_jsx(\"span\",{style:{minWidth:\"max-content\",fontFamily:labelFont?.fontFamily,fontSize:labelFont?.fontSize,fontWeight:labelFont?.fontWeight,fontStyle:labelFont?.fontStyle,lineHeight:labelFont?.lineHeight,letterSpacing:labelFont?.letterSpacing,textAlign:labelFont?.textAlign??\"center\"},children:label}):null]})});}addPropertyControls(MobileBrochureButton,{onOpen:{type:ControlType.EventHandler,title:\"On Open\"},label:{type:ControlType.String,title:\"Label\",defaultValue:\"Download Brochure\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#1F7D57\"},foreground:{type:ControlType.Color,title:\"Foreground\",defaultValue:\"#FFFFFF\"},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MobileBrochureButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerIntrinsicWidth\":\"192\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"44\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MobileBrochureButton.map"],"mappings":"A,qNAMG,SAAwBe,EAAqB,EAAM,CAAC,GAAK,CAAC,QAAM,oBAAoB,aAAW,UAAU,aAAW,UAAU,SAAO,YAAU,SAAOC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