{"version":3,"file":"SolutionStepNav_2.C4TLWARN.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/UVVzJTceCH2NNATffo27/lyRxxgxY2goWNUVhG3bE/SolutionStepNav_2.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useLayoutEffect,useRef,useState}from\"react\";function findEl(name){if(typeof document===\"undefined\")return null;const escaped=name.replace(/\"/g,'\\\\\"');return document.querySelector(`[data-framer-name=\"${escaped}\"]`);}function findAllRows(){const out=[];for(let i=1;i<=3;i++){const r=findEl(`FeatureRow${i}`);if(r)out.push(r);}return out;}/**\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 160\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function SolutionStepNav(props){const{steps,topOffset,phoneBreakpoint}=props;const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[active,setActive]=useState(0);const[isPhone,setIsPhone]=useState(false);const wrapperRef=useRef(null);const columnRef=useRef(null);const columnSnapshot=useRef(\"\");const rowSnapshots=useRef(new Map);const childSnapshots=useRef(new Map);const prevIsPhone=useRef(false);const rafRef=useRef(null);useLayoutEffect(()=>{if(isCanvas)return;if(typeof window===\"undefined\"||!wrapperRef.current)return;let el=wrapperRef.current;for(let i=0;i<10&&el&&el.parentElement;i++){const parent=el.parentElement;const cs=window.getComputedStyle(parent);if(cs.display===\"flex\"&&cs.flexDirection.startsWith(\"row\")){columnRef.current=el;el.style.setProperty(\"align-self\",\"stretch\",\"important\");el.style.setProperty(\"height\",\"auto\",\"important\");let inner=wrapperRef.current;while(inner&&inner!==el){inner.style.height=\"100%\";inner=inner.parentElement;}break;}el=parent;}},[isCanvas]);useEffect(()=>{if(isCanvas)return;const update=()=>setIsPhone(window.innerWidth<phoneBreakpoint);update();window.addEventListener(\"resize\",update);return()=>window.removeEventListener(\"resize\",update);},[phoneBreakpoint,isCanvas]);useEffect(()=>{if(isCanvas)return;const wasPhone=prevIsPhone.current;prevIsPhone.current=isPhone;if(wasPhone===isPhone)return;const col=columnRef.current;const rows=findAllRows();if(isPhone){if(col)columnSnapshot.current=col.getAttribute(\"style\")||\"\";rows.forEach(r=>{rowSnapshots.current.set(r,r.getAttribute(\"style\")||\"\");Array.from(r.children).forEach(child=>{if(child instanceof HTMLElement){childSnapshots.current.set(child,child.getAttribute(\"style\")||\"\");}});});if(col){col.style.cssText=\"display: none !important; width: 0 !important; min-width: 0 !important; max-width: 0 !important; padding: 0 !important; margin: 0 !important; flex: 0 0 0 !important;\";}rows.forEach(r=>{r.style.setProperty(\"flex-direction\",\"column\",\"important\");r.style.setProperty(\"align-items\",\"stretch\",\"important\");r.style.setProperty(\"gap\",\"24px\",\"important\");r.style.setProperty(\"height\",\"auto\",\"important\");Array.from(r.children).forEach(child=>{if(child instanceof HTMLElement){child.style.setProperty(\"width\",\"100%\",\"important\");child.style.setProperty(\"max-width\",\"none\",\"important\");child.style.setProperty(\"min-width\",\"0\",\"important\");child.style.setProperty(\"flex\",\"0 0 auto\",\"important\");child.style.setProperty(\"height\",\"auto\",\"important\");}});});}else{if(col&&columnSnapshot.current!==\"\"){col.setAttribute(\"style\",columnSnapshot.current);}rows.forEach(r=>{const snap=rowSnapshots.current.get(r);if(snap!==undefined)r.setAttribute(\"style\",snap);Array.from(r.children).forEach(child=>{if(child instanceof HTMLElement){const cs=childSnapshots.current.get(child);if(cs!==undefined)child.setAttribute(\"style\",cs);}});});}},[isPhone,isCanvas]);useEffect(()=>{if(isCanvas)return;const onScroll=()=>{if(rafRef.current!=null)return;rafRef.current=requestAnimationFrame(()=>{rafRef.current=null;const probe=window.innerHeight*.4;let next=0;for(let i=0;i<steps.length;i++){const el=findEl(steps[i].framerName);if(!el)continue;if(el.getBoundingClientRect().top<=probe)next=i;}setActive(p=>p===next?p:next);});};onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>{window.removeEventListener(\"scroll\",onScroll);if(rafRef.current!=null)cancelAnimationFrame(rafRef.current);};},[steps,isCanvas]);const onClick=i=>{const el=findEl(steps[i].framerName);if(!el)return;const y=el.getBoundingClientRect().top+window.scrollY-topOffset-24;window.scrollTo({top:y,behavior:\"smooth\"});};if(isPhone&&!isCanvas){return /*#__PURE__*/_jsx(\"div\",{ref:wrapperRef,\"aria-hidden\":true,style:{width:0,height:0,overflow:\"visible\"}});}return /*#__PURE__*/_jsx(\"div\",{ref:wrapperRef,style:{width:\"100%\",height:\"100%\",position:\"relative\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{position:\"sticky\",top:topOffset,display:\"inline-flex\",flexDirection:\"column\",gap:3,padding:3,borderRadius:14,background:\"linear-gradient(180deg, #2c2c2c 0%, #161616 50%, #0a0a0a 100%)\",boxShadow:[\"inset 0 1.5px 0 rgba(255,255,255,0.18)\",\"inset 1px 0 0 rgba(255,255,255,0.05)\",\"inset -1px 0 0 rgba(0,0,0,0.55)\",\"inset 0 -1.5px 0 rgba(0,0,0,0.95)\",\"inset 0 0 18px rgba(0,0,0,0.35)\",\"0 1px 0 rgba(255,255,255,0.04)\",\"0 2px 4px rgba(0,0,0,0.45)\",\"0 8px 18px rgba(0,0,0,0.55)\",\"0 22px 44px rgba(0,0,0,0.55)\"].join(\", \"),backdropFilter:\"blur(6px) saturate(135%)\",WebkitBackdropFilter:\"blur(6px) saturate(135%)\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:3,left:3,width:155,height:40,transform:`translateY(${active*43}px)`,transition:\"transform 500ms cubic-bezier(0.16,1,0.3,1)\",borderRadius:10,background:\"linear-gradient(180deg, #fffaeb 0%, #f1e2b8 50%, #cdba8a 100%)\",boxShadow:[\"inset 0 1px 0 rgba(255,255,255,0.65)\",\"inset 0 -1.5px 0 rgba(0,0,0,0.18)\",\"0 1px 2px rgba(0,0,0,0.35)\",\"0 4px 10px rgba(0,0,0,0.45)\",\"0 0 18px rgba(255,250,235,0.30)\"].join(\", \")}}),steps.map((s,i)=>{const isActive=i===active;return /*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>onClick(i),style:{position:\"relative\",appearance:\"none\",border:0,background:\"transparent\",padding:\"0 16px\",height:40,width:155,textAlign:\"left\",cursor:\"pointer\",borderRadius:10,color:isActive?\"#1a1410\":\"#a3a3a3\",fontFamily:\"Geist, system-ui, sans-serif\",fontSize:13,fontWeight:500,letterSpacing:\"-0.01em\",whiteSpace:\"nowrap\",transition:\"color 320ms cubic-bezier(0.16,1,0.3,1)\",zIndex:1},children:s.label},s.framerName);})]})});}SolutionStepNav.defaultProps={topOffset:110,phoneBreakpoint:600,// Optimization page order: Issue Detail is the first row (FeatureRow3 by name),\n// then Priority list (FeatureRow1), then AI Crawlers (FeatureRow2).\nsteps:[{label:\"Detail\",framerName:\"FeatureRow3\"},{label:\"Priority\",framerName:\"FeatureRow1\"},{label:\"Crawlers\",framerName:\"FeatureRow2\"}]};addPropertyControls(SolutionStepNav,{topOffset:{type:ControlType.Number,title:\"Top Offset\",defaultValue:110,min:0,max:240,step:4},phoneBreakpoint:{type:ControlType.Number,title:\"Phone Breakpoint\",defaultValue:600,min:400,max:900,step:20},steps:{type:ControlType.Array,title:\"Steps\",control:{type:ControlType.Object,controls:{label:{type:ControlType.String,defaultValue:\"Step\"},framerName:{type:ControlType.String,defaultValue:\"FeatureRow1\"}}},defaultValue:[{label:\"Detail\",framerName:\"FeatureRow3\"},{label:\"Priority\",framerName:\"FeatureRow1\"},{label:\"Crawlers\",framerName:\"FeatureRow2\"}]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SolutionStepNav\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"160\",\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SolutionStepNav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