{"version":3,"file":"VideoEmbed.DRnIPReG.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","_e","p","c","init_jsx_runtime","init_framer_BWFVvmND","addPropertyControls","ControlType","VideoEmbed","props","play","setPlay","box","radius","videoId","title","accent","init_VideoEmbed"],"sources":["https:/framerusercontent.com/modules/Nr4R52tbLg2DJinoZdAl/VvDi7iJ9Nt7s6UikWBwc/VideoEmbed.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Click-to-load YouTube player: shows the thumbnail and a play button, loads the iframe only when clicked.\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function VideoEmbed(props){const{videoId,title,accent,radius}=props;const[play,setPlay]=useState(false);const box={position:\"relative\",width:\"100%\",aspectRatio:\"16 / 9\",borderRadius:radius,overflow:\"hidden\",background:\"#0B1020\",cursor:play?\"default\":\"pointer\"};if(play)return /*#__PURE__*/_jsx(\"div\",{style:box,children:/*#__PURE__*/_jsx(\"iframe\",{src:`https://www.youtube-nocookie.com/embed/${videoId}?autoplay=1&rel=0&modestbranding=1&playsinline=1`,title:title,allow:\"autoplay; encrypted-media; picture-in-picture; fullscreen\",allowFullScreen:true,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:0}})});return /*#__PURE__*/_jsxs(\"div\",{style:box,onClick:()=>setPlay(true),role:\"button\",\"aria-label\":`Play ${title}`,children:[/*#__PURE__*/_jsx(\"img\",{src:`https://i.ytimg.com/vi/${videoId}/hqdefault.jpg`,alt:title,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:\"linear-gradient(180deg, rgba(11,16,32,0) 50%, rgba(11,16,32,0.45) 100%)\"}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",width:64,height:64,marginLeft:-32,marginTop:-32,borderRadius:64,background:accent,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 8px 24px rgba(38,104,246,0.35)\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:0,height:0,marginLeft:5,borderTop:\"11px solid transparent\",borderBottom:\"11px solid transparent\",borderLeft:\"17px solid #fff\"}})})]});}addPropertyControls(VideoEmbed,{videoId:{type:ControlType.String,title:\"Video ID\",defaultValue:\"iuirEIayp2E\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Proshort video\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#2668F6\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:40}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoEmbed.map"],"mappings":"A,iLAIG,SAAwBU,EAAW,EAAM,CAAC,GAAK,CAAC,UAAQ,QAAM,SAAO,UAAQC,EAAW,CAACC,EAAKC,GAASb,EAAS,EAAK,EAAQc,EAAI,CAAC,SAAS,WAAW,MAAM,OAAO,YAAY,SAAS,aAAaC,EAAO,SAAS,SAAS,WAAW,UAAU,OAAOH,EAAK,UAAU,SAAS,EAAgX,OAA3WA,EAAyB,gBAAK,MAAM,CAAC,MAAME,EAAI,SAAsB,gBAAK,SAAS,CAAC,IAAI,0CAA0CE,EAAQ,kDAAwD,QAAM,MAAM,4DAA4D,gBAAgB,GAAK,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,MAAM,OAAO,OAAO,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAsB,gBAAM,MAAM,CAAC,MAAMF,EAAI,YAAYD,EAAQ,EAAI,EAAE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