{"version":3,"file":"VideoOverlay.CWRvB5Io.mjs","names":["useMemo","useState"],"sources":["https:/framerusercontent.com/modules/3DonIM11hhSppgGe85sk/3oC3Kops2WF7Gkk5xZyF/VideoOverlay.js"],"sourcesContent":["// Video component with text overlay\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo,useRef,useState,startTransition}from\"react\";/**\n * Video with Text Overlay\n *\n * @framerIntrinsicWidth 640\n * @framerIntrinsicHeight 360\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function VideoOverlay(props){const{overlayText,textColor,backgroundColor,font,overlayPosition,overlayOpacity,coverImage={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Cover image\"},style}=props;const justifyContent=useMemo(()=>{if(overlayPosition===\"top\")return\"flex-start\";if(overlayPosition===\"center\")return\"center\";return\"flex-end\";},[overlayPosition]);const videoRef=useRef(null);const[isPlaying,setIsPlaying]=useState(false);return /*#__PURE__*/_jsxs(\"div\",{style:{...style,width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\",borderRadius:8,background:\"#000\",display:\"flex\",flexDirection:\"column\",minWidth:0,minHeight:0,aspectRatio:16/9,maxWidth:\"100vw\",maxHeight:\"100vw\"},onMouseEnter:e=>{startTransition(()=>setIsPlaying(true));},onMouseLeave:e=>{startTransition(()=>setIsPlaying(false));},children:[coverImage?.src&&/*#__PURE__*/_jsx(\"img\",{src:coverImage.src,alt:coverImage.alt||\"Cover image\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",zIndex:1,pointerEvents:\"none\",borderRadius:8,opacity:1}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:2,pointerEvents:\"none\",borderRadius:8,background:`linear-gradient(to bottom, ${props.gradientColor1} 0%, ${props.gradientColor2} 60%, ${props.gradientColor3} 100%)`}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent,alignItems:\"center\",pointerEvents:\"none\",padding:0,zIndex:3},children:/*#__PURE__*/_jsx(\"div\",{style:{background:backgroundColor,color:textColor,opacity:overlayOpacity,padding:\"clamp(8px, 3vw, 24px) clamp(16px, 6vw, 48px)\",borderRadius:8,margin:overlayPosition===\"bottom\"?\"clamp(32px, 8vw, 64px) 0 clamp(24px, 4vw, 48px) 0\":overlayPosition===\"top\"?\"clamp(24px, 4vw, 48px) 0 clamp(32px, 8vw, 64px) 0\":\"clamp(8px, 2vw, 32px)\",maxWidth:\"min(90vw, 700px)\",...font,pointerEvents:\"auto\",boxShadow:\"0 2px 8px rgba(0,0,0,0.10)\",textAlign:\"center\",width:\"fit-content\",minWidth:120,wordBreak:\"break-word\",fontSize:font?.fontSize?`clamp(16px, 4vw, ${font.fontSize})`:undefined},children:overlayText})})]});}addPropertyControls(VideoOverlay,{coverImage:{type:ControlType.ResponsiveImage,title:\"Cover Image\"},overlayText:{type:ControlType.String,title:\"Text\",defaultValue:\"Your overlay text here\",displayTextArea:true},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Overlay BG\",defaultValue:\"#000000\"},overlayOpacity:{type:ControlType.Number,title:\"Overlay Opacity\",defaultValue:.7,min:0,max:1,step:.05},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1.1em\"}},overlayPosition:{type:ControlType.Enum,title:\"Text Position\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],defaultValue:\"center\",displaySegmentedControl:true},gradientColor1:{type:ControlType.Color,title:\"Gradient Top\",defaultValue:\"rgba(0,0,0,0.7)\"},gradientColor2:{type:ControlType.Color,title:\"Gradient Middle\",defaultValue:\"rgba(0,0,0,0.3)\"},gradientColor3:{type:ControlType.Color,title:\"Gradient Bottom\",defaultValue:\"rgba(0,0,0,0.7)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoOverlay\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"360\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"640\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoOverlay.map"],"mappings":"gSASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,cAAY,YAAU,kBAAgB,OAAK,kBAAgB,iBAAe,aAAW,CAAC,IAAI,sEAAsE,IAAI,cAAc,CAAC,SAAO,EAAY,EAAeA,MAAgB,IAAkB,MAAY,aAAgB,IAAkB,SAAe,SAAe,WAAa,CAAC,EAAgB,CAAC,CAAgB,EAAO,KAAK,CAAC,GAAK,CAAC,EAAU,GAAcC,EAAS,GAAM,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,SAAS,aAAa,EAAE,WAAW,OAAO,QAAQ,OAAO,cAAc,SAAS,SAAS,EAAE,UAAU,EAAE,YAAY,GAAG,EAAE,SAAS,QAAQ,UAAU,QAAQ,CAAC,aAAa,GAAG,CAAC,MAAoB,EAAa,GAAK,CAAC,EAAG,aAAa,GAAG,CAAC,MAAoB,EAAa,GAAM,CAAC,EAAG,SAAS,CAAC,GAAY,KAAkB,EAAK,MAAM,CAAC,IAAI,EAAW,IAAI,IAAI,EAAW,KAAK,cAAc,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAA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