{"version":3,"file":"Video_Link.C8WT2UXh.mjs","names":[],"sources":["https:/framerusercontent.com/modules/yb7qTyzKzC4zkEsd828B/dItQ4wUC04bFZBUsuS0M/Video_Link.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function VideoLink({video,poster,link,newTab,objectFit,autoplay,loop,muted,radius}){if(!video){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#eee\",color:\"#999\",fontFamily:\"sans-serif\",fontSize:14,borderRadius:radius},children:\"Upload a video\"});}const videoEl=/*#__PURE__*/_jsx(\"video\",{src:video,poster:poster||undefined,autoPlay:autoplay,loop:loop,playsInline:true,// muted set via ref because React's muted attribute is unreliable,\n// and muted is required for autoplay in most browsers.\nref:el=>{if(el)el.muted=muted;},style:{width:\"100%\",height:\"100%\",objectFit,display:\"block\",borderRadius:radius,// clicks pass through to the wrapping link\npointerEvents:\"none\"}},video);// No link set → just show the video.\nif(!link){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\"},children:videoEl});}return /*#__PURE__*/_jsx(\"a\",{href:link,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined,style:{display:\"block\",width:\"100%\",height:\"100%\",cursor:\"pointer\",borderRadius:radius,overflow:\"hidden\"},children:videoEl});}addPropertyControls(VideoLink,{video:{type:ControlType.File,title:\"Video\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},poster:{type:ControlType.Image,title:\"Poster\",description:\"Placeholder frame shown before the video loads (≥ 60\\xd730px); also the SEO thumbnail\"},link:{type:ControlType.Link,title:\"Links To\"},newTab:{type:ControlType.Boolean,title:\"Open In\",defaultValue:false,enabledTitle:\"New Tab\",disabledTitle:\"Same Tab\"},objectFit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\",\"fill\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\"],defaultValue:\"cover\",displaySegmentedControl:true},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\",description:\"Keep on for reliable autoplay\"},radius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:0,min:0,max:100,step:1,unit:\"px\",displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoLink\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Video_Link.map"],"mappings":"4JAA+F,SAAwB,EAAU,CAAC,QAAM,SAAO,OAAK,SAAO,YAAU,WAAS,OAAK,QAAM,UAAQ,CAAC,GAAG,CAAC,EAAO,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,WAAW,OAAO,MAAM,OAAO,WAAW,aAAa,SAAS,GAAG,aAAa,CAAM,EAAE,SAAS,gBAAgB,CAAC,EAAG,IAAM,EAAqB,EAAK,QAAQ,CAAC,IAAI,EAAM,OAAO,GAAQ,IAAA,GAAU,SAAS,EAAc,OAAK,YAAY,GAEnjB,IAAI,GAAI,CAAI,IAAG,EAAG,MAAM,EAAM,EAAE,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,YAAU,QAAQ,QAAQ,aAAa,EACzG,cAAc,MAAM,CAAC,EAAE,CAAK,EACqE,OAA7F,EAAiH,EAAK,IAAI,CAAC,KAAK,EAAK,OAAO,EAAO,SAAS,IAAA,GAAU,IAAI,EAAO,sBAAsB,IAAA,GAAU,MAAM,CAAC,QAAQ,QAAQ,MAAM,OAAO,OAAO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