{"version":3,"file":"Windows_CodeBlock.DOhnE0Ds.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/U0Ih31BEUFlEnEZlY6al/tRRzMwua3JbE0BpjknpZ/Windows_CodeBlock.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{Frame,useMotionValue}from\"framer\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function WindowGroup(props){const{width,height,boundaryPadding,window1Active,window1Inactive,window2Active,window2Inactive,window3Active,window3Inactive,window1Width,window1Height,window2Width,window2Height,window3Width,window3Height,window1X,window1Y,window2X,window2Y,window3X,window3Y,canvasWidth=1680,canvasHeight=800,window1Radius=12,window2Radius=0,window3Radius=0}=props;const[stackOrder,setStackOrder]=useState([2,0,1]);const positions=[useMotionValue({x:window1X,y:window1Y}),useMotionValue({x:window2X,y:window2Y}),useMotionValue({x:window3X,y:window3Y})];const handleDragStart=index=>{// Move dragged index to end (top of stack)\nsetStackOrder(prev=>[...prev.filter(i=>i!==index),index]);};const renderWindow=(index,activeSrc,inactiveSrc,w,h)=>{const isActive=stackOrder[stackOrder.length-1]===index;const zIndex=stackOrder.indexOf(index)+1;const radius=index===0?window1Radius:index===1?window2Radius:window3Radius;return /*#__PURE__*/_jsxs(Frame,{drag:true,dragMomentum:false,dragConstraints:{left:boundaryPadding,top:boundaryPadding,right:canvasWidth-w-boundaryPadding,bottom:canvasHeight-h-boundaryPadding},x:positions[index].get().x,y:positions[index].get().y,width:w,height:h,style:{position:\"absolute\",zIndex:zIndex,boxShadow:\"6px 7px 10px rgba(0, 0, 0, 0.25)\",backdropFilter:\"blur(8px)\",WebkitBackdropFilter:\"blur(8px)\",borderRadius:radius},onDragStart:()=>handleDragStart(index),background:\"transparent\",children:[/*#__PURE__*/_jsx(\"img\",{src:inactiveSrc,draggable:false,style:{width:\"100%\",height:\"100%\",position:\"absolute\",top:0,left:0,objectFit:\"cover\",opacity:isActive?1:.8,transition:\"opacity 0.2s\"}}),/*#__PURE__*/_jsx(\"img\",{src:activeSrc,draggable:false,style:{width:\"100%\",height:\"100%\",position:\"absolute\",top:0,left:0,objectFit:\"cover\",opacity:isActive?1:0,transition:\"opacity 0.2s\"}})]},index);};return /*#__PURE__*/_jsxs(Frame,{width:width,height:height,background:\"transparent\",style:{position:\"relative\",overflow:\"hidden\"},children:[renderWindow(0,window1Active,window1Inactive,window1Width,window1Height),renderWindow(1,window2Active,window2Inactive,window2Width,window2Height),renderWindow(2,window3Active,window3Inactive,window3Width,window3Height)]});}// 🧩 Property controls\naddPropertyControls(WindowGroup,{width:{type:ControlType.Number,title:\"Group Width\",defaultValue:400},height:{type:ControlType.Number,title:\"Group Height\",defaultValue:300},boundaryPadding:{type:ControlType.Number,title:\"Drag Padding\",defaultValue:10},// Window 1\nwindow1Active:{type:ControlType.Image,title:\"Window 1 Active\"},window1Inactive:{type:ControlType.Image,title:\"Window 1 Inactive\"},window1Width:{type:ControlType.Number,title:\"Window 1 Width\",defaultValue:120},window1Height:{type:ControlType.Number,title:\"Window 1 Height\",defaultValue:100},window1X:{type:ControlType.Number,title:\"Window 1 X\",defaultValue:0},window1Y:{type:ControlType.Number,title:\"Window 1 Y\",defaultValue:0},// Window 2\nwindow2Active:{type:ControlType.Image,title:\"Window 2 Active\"},window2Inactive:{type:ControlType.Image,title:\"Window 2 Inactive\"},window2Width:{type:ControlType.Number,title:\"Window 2 Width\",defaultValue:140},window2Height:{type:ControlType.Number,title:\"Window 2 Height\",defaultValue:100},window2X:{type:ControlType.Number,title:\"Window 2 X\",defaultValue:150},window2Y:{type:ControlType.Number,title:\"Window 2 Y\",defaultValue:0},// Window 3\nwindow3Active:{type:ControlType.Image,title:\"Window 3 Active\"},window3Inactive:{type:ControlType.Image,title:\"Window 3 Inactive\"},window3Width:{type:ControlType.Number,title:\"Window 3 Width\",defaultValue:100},window3Height:{type:ControlType.Number,title:\"Window 3 Height\",defaultValue:120},window3X:{type:ControlType.Number,title:\"Window 3 X\",defaultValue:75},window3Y:{type:ControlType.Number,title:\"Window 3 Y\",defaultValue:390},canvasWidth:{type:ControlType.Number,title:\"Canvas Width\",defaultValue:1680},canvasHeight:{type:ControlType.Number,title:\"Canvas Height\",defaultValue:800},window1Radius:{type:ControlType.Number,title:\"Window 1 Radius\",defaultValue:12},window2Radius:{type:ControlType.Number,title:\"Window 2 Radius\",defaultValue:12},window3Radius:{type:ControlType.Number,title:\"Window 3 Radius\",defaultValue:12}});\nexport const __FramerMetadata__ = {\"exports\":{\"WindowGroup\":{\"type\":\"reactComponent\",\"name\":\"WindowGroup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Windows_CodeBlock.map"],"mappings":"2UAAkL,SAAgB,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,SAAO,kBAAgB,gBAAc,kBAAgB,gBAAc,kBAAgB,gBAAc,kBAAgB,eAAa,gBAAc,eAAa,gBAAc,eAAa,gBAAc,WAAS,WAAS,WAAS,WAAS,WAAS,WAAS,cAAY,KAAK,eAAa,IAAI,gBAAc,GAAG,gBAAc,EAAE,gBAAc,EAAE,CAAC,EAAW,CAAC,EAAW,EAAc,CAACA,EAAS,CAAC,EAAE,EAAE,EAAE,EAAQ,EAAU,CAAC,EAAe,CAAG,EAAS,EAAE,EAAS,EAAE,EAAe,CAAC,EAAE,EAAS,EAAE,EAAS,EAAE,EAAe,CAAC,EAAE,EAAS,EAAE,EAAS,EAAE,CAAO,EAAgB,GAAO,CAC5wB,EAAc,GAAM,CAAC,GAAG,EAAK,OAAO,GAAG,IAAI,GAAO,EAAM,CAAG,EAAO,GAAc,EAAM,EAAU,EAAY,EAAE,IAAI,CAAC,IAAM,EAAS,EAAW,EAAW,OAAO,KAAK,EAAY,EAAO,EAAW,QAAQ,GAAO,EAAQ,EAAO,IAAQ,EAAE,EAAc,IAAQ,EAAE,EAAc,EAAc,OAAoB,EAAM,EAAM,CAAC,KAAK,GAAK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