{"version":3,"file":"VideoCaseStudyCard.MjoeXazW.mjs","names":["React.useState","React.useRef","React.useMemo","React.useCallback"],"sources":["https:/framerusercontent.com/modules/h3diIYDe4Mz8Q4P1OX8R/8z6fXNAUaC57sgLrtjxo/VideoCaseStudyCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,Link}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function VideoCaseStudyCard(props){const{projectVideo=\"\",title=\"Project Title\",descriptionTags=\"Direction \\xb7 Design \\xb7 2026\",projectLink=\"\",titleColor=\"#000000\",titleHoverColor=\"#000000\",descriptionTagsColor=\"#000000\",descriptionTagsHoverColor=\"#000000\",mediaToTextGap=8,style}=props;const[isHovered,setIsHovered]=React.useState(false);const[containerWidth,setContainerWidth]=React.useState(0);const rootRef=React.useRef(null);const canHover=React.useMemo(()=>{if(typeof window!==\"undefined\"){return window.matchMedia(\"(hover: hover) and (pointer: fine)\").matches;}return false;},[]);const handleMouseEnter=React.useCallback(()=>{if(!canHover)return;React.startTransition(()=>setIsHovered(true));},[canHover]);const handleMouseLeave=React.useCallback(()=>{if(!canHover)return;React.startTransition(()=>setIsHovered(false));},[canHover]);const mimeType=React.useMemo(()=>{const clean=projectVideo.toLowerCase().split(\"?\")[0].split(\"#\")[0];if(clean.endsWith(\".mov\"))return\"video/quicktime\";if(clean.endsWith(\".webm\"))return\"video/webm\";if(clean.endsWith(\".mp4\"))return\"video/mp4\";return\"video/mp4\";},[projectVideo]);React.useEffect(()=>{if(typeof window===\"undefined\")return;const node=rootRef.current;if(!node)return;const updateWidth=()=>{const next=node.getBoundingClientRect().width;React.startTransition(()=>setContainerWidth(next));};updateWidth();if(typeof ResizeObserver!==\"undefined\"){const observer=new ResizeObserver(()=>updateWidth());observer.observe(node);return()=>observer.disconnect();}window.addEventListener(\"resize\",updateWidth);return()=>window.removeEventListener(\"resize\",updateWidth);},[]);const isNarrow=React.useMemo(()=>containerWidth>0&&containerWidth<420,[containerWidth]);const mediaContent=projectVideo?/*#__PURE__*/_jsx(\"video\",{autoPlay:true,muted:true,loop:true,playsInline:true,controls:false,style:{width:\"100%\",height:\"100%\",display:\"block\",objectFit:\"contain\",background:\"transparent\"},children:/*#__PURE__*/_jsx(\"source\",{src:projectVideo,type:mimeType})}):/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{width:\"100%\",height:\"100%\",background:\"transparent\"}});const cardContent=/*#__PURE__*/_jsxs(\"div\",{ref:rootRef,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,style:{position:\"relative\",...style,width:\"100%\",maxWidth:\"100%\",minWidth:0,display:\"flex\",flexDirection:\"column\",background:\"transparent\",padding:0,margin:0,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",aspectRatio:\"1.47 / 1\",borderRadius:4,overflow:\"hidden\",background:\"transparent\"},children:mediaContent}),/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:mediaToTextGap,width:\"100%\",display:\"flex\",maxWidth:\"100%\",minWidth:0,flexDirection:isNarrow?\"column\":\"row\",flexWrap:isNarrow?\"nowrap\":\"wrap\",alignItems:isNarrow?\"flex-start\":\"baseline\",gap:8,rowGap:4},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"Inter, sans-serif\",fontSize:16,fontWeight:400,lineHeight:\"1.2em\",letterSpacing:\"0em\",color:isHovered?titleHoverColor:titleColor,transition:\"color 0.2s ease\",textAlign:\"left\",width:isNarrow?\"100%\":\"auto\",maxWidth:isNarrow?\"100%\":\"none\",minWidth:0,whiteSpace:\"normal\",wordBreak:\"break-word\",overflowWrap:\"anywhere\"},children:title}),/*#__PURE__*/_jsx(\"div\",{style:{marginLeft:isNarrow?0:\"auto\",fontFamily:\"Inter, sans-serif\",fontSize:10,fontWeight:300,lineHeight:\"1.3em\",letterSpacing:\"0em\",color:isHovered?descriptionTagsHoverColor:descriptionTagsColor,transition:\"color 0.2s ease\",textAlign:isNarrow?\"left\":\"right\",width:isNarrow?\"100%\":\"auto\",maxWidth:isNarrow?\"100%\":\"none\",minWidth:0,whiteSpace:\"normal\",wordBreak:\"break-word\",flex:isNarrow?\"0 0 auto\":\"1 1 220px\",overflowWrap:\"anywhere\"},children:descriptionTags})]})]});if(!projectLink)return cardContent;return /*#__PURE__*/_jsx(Link,{href:projectLink,children:/*#__PURE__*/_jsx(\"a\",{style:{position:\"relative\",display:\"block\",width:\"100%\",color:\"inherit\",textDecoration:\"none\"},\"aria-label\":title||\"Case study\",children:cardContent})});}addPropertyControls(VideoCaseStudyCard,{projectVideo:{type:ControlType.File,title:\"Project Video\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\"]},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Project Title\"},descriptionTags:{type:ControlType.String,title:\"Description / Tags\",defaultValue:\"Direction \\xb7 Design \\xb7 2026\"},projectLink:{type:ControlType.Link,title:\"Project Link\",defaultValue:\"\"},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#000000\"},titleHoverColor:{type:ControlType.Color,title:\"Title Hover Color\",defaultValue:\"#000000\"},descriptionTagsColor:{type:ControlType.Color,title:\"Description / Tags Color\",defaultValue:\"#000000\"},descriptionTagsHoverColor:{type:ControlType.Color,title:\"Description / Tags Hover Color\",defaultValue:\"#000000\"},mediaToTextGap:{type:ControlType.Number,title:\"Media to Text Gap\",defaultValue:8,min:0,max:64,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"VideoCaseStudyCard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./VideoCaseStudyCard.map"],"mappings":"yOAGG,SAAwB,EAAmB,EAA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