{"version":3,"file":"InteractiveLine.BTIsCpMp.mjs","names":["useState","useRef","useCallback"],"sources":["https:/framerusercontent.com/modules/KPvuDoXesLmB460OZkq4/o9rewOWCziwQwtoCJG9L/InteractiveLine.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useRef,useState,useCallback}from\"react\";export default function InteractiveDivider({color=\"#00f5a0\",baseColor=\"#E0E0E0\",lineCount=200,lineWidth=2,lineHeight=20,gap=4,radius=6,liftHeight=8,spreadRadius=5}){const[hoveredIndex,setHoveredIndex]=useState(null);const containerRef=useRef(null);const getLift=i=>{if(hoveredIndex===null)return 0;const dist=Math.abs(i-hoveredIndex);if(dist===0)return liftHeight;if(dist<=spreadRadius)return liftHeight*(1-dist/(spreadRadius+1));return 0;};const getAlpha=i=>{if(hoveredIndex===null)return 0;const dist=Math.abs(i-hoveredIndex);if(dist===0)return 1;if(dist<=spreadRadius)return 1-dist/(spreadRadius+1)*.85;return 0;};const handleMouseMove=useCallback(e=>{const container=containerRef.current;if(!container)return;const rect=container.getBoundingClientRect();const x=e.clientX-rect.left;const step=lineWidth+gap;const index=Math.floor(x/step);setHoveredIndex(Math.max(0,Math.min(lineCount-1,index)));},[lineWidth,gap,lineCount]);const handleMouseLeave=useCallback(()=>{setHoveredIndex(null);},[]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,onMouseMove:handleMouseMove,onMouseLeave:handleMouseLeave,style:{display:\"flex\",alignItems:\"flex-end\",width:\"100%\",height:lineHeight+liftHeight+4,paddingBottom:2,cursor:\"default\",overflow:\"visible\"},children:Array.from({length:lineCount}).map((_,i)=>{const alpha=getAlpha(i);return /*#__PURE__*/_jsxs(\"div\",{style:{width:lineWidth,height:lineHeight,borderRadius:radius,marginRight:gap,flexShrink:0,position:\"relative\",transform:`translateY(${-getLift(i)}px)`,transition:hoveredIndex===null?\"transform 0.4s ease\":\"transform 0.15s ease\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,borderRadius:radius,backgroundColor:baseColor}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,borderRadius:radius,backgroundColor:color,opacity:alpha,transition:hoveredIndex===null?\"opacity 0.3s ease\":\"opacity 0s\"}})]},i);})});}addPropertyControls(InteractiveDivider,{color:{type:ControlType.Color,title:\"Hover krāsa\",defaultValue:\"#00f5a0\"},baseColor:{type:ControlType.Color,title:\"Pamatkrāsa\",defaultValue:\"#E0E0E0\"},lineCount:{type:ControlType.Number,title:\"Līniju skaits\",defaultValue:200,min:10,max:500,step:10},lineWidth:{type:ControlType.Number,title:\"Līnijas platums\",defaultValue:2,min:1,max:10,unit:\"px\"},lineHeight:{type:ControlType.Number,title:\"Līnijas augstums\",defaultValue:20,min:4,max:80,unit:\"px\"},gap:{type:ControlType.Number,title:\"Atstarpe\",defaultValue:4,min:1,max:20,unit:\"px\"},radius:{type:ControlType.Number,title:\"Noapaļojums\",defaultValue:6,min:0,max:20,unit:\"px\"},liftHeight:{type:ControlType.Number,title:\"Pacēlums\",defaultValue:8,min:0,max:40,unit:\"px\"},spreadRadius:{type:ControlType.Number,title:\"Izplatīšanās rādiuss\",defaultValue:5,min:1,max:20,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InteractiveDivider\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InteractiveLine.map"],"mappings":"0LAA4J,SAAwB,EAAmB,CAAC,QAAM,UAAU,YAAU,UAAU,YAAU,IAAI,YAAU,EAAE,aAAW,GAAG,MAAI,EAAE,SAAO,EAAE,aAAW,EAAE,eAAa,GAAG,CAAC,GAAK,CAAC,EAAa,GAAiBA,EAAS,KAAK,CAAO,EAAaC,EAAO,KAAK,CAAO,EAAQ,GAAG,CAAC,GAAG,IAAe,KAAK,MAAO,GAAE,IA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