{"version":3,"file":"TabbedCards.ChoHZ7LB.mjs","names":["useState","useRef","startTransition"],"sources":["https:/framerusercontent.com/modules/DtprOwoZc9p1Y77lIC0D/4ime5pQ7t9iA2M4OQ5u8/TabbedCards.js"],"sourcesContent":["// Responsive tabbed cards component with media display on the right\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useRef,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function TabbedCards(props){const{tabs=[{title:\"Detailed Condition Reports & Defect Analysis\",description:\"A summary of the roof's overall condition, highlighting major findings and outlining any immediate steps to address the issues.\",imageUrl:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"Detailed roof condition report\",visible:true,showVideo:true},{title:\"High-Resolution drone photography\",description:\"We use the latest cameras, lenses, equipment to ensure photos are sharp, vibrant, and clear.\",imageUrl:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"High-resolution drone photography\",visible:true,showVideo:true},{title:\"4K Drone Video Inspection\",description:\"Minimum 4K resolution videos provided\",imageUrl:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"4K drone video inspection\",visible:true,showVideo:true},{title:\"Interactive 3D Roof Models\",description:\"3D Models can be provided in range of formats DWG, DGN, IFC etc\",imageUrl:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"Interactive 3D roof models\",visible:true,showVideo:true},{title:\"High-Resolution Drone Map\",description:\"Ultra clear and sharp orthomosaic to view area of interest\",imageUrl:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"High-resolution drone map\",visible:true,showVideo:true}],backgroundColor=\"#FFFFFF\",cardBackground=\"#F7F7F7\",activeCardBackground=\"#FFFFFF\",borderColor=\"#000000\",titleColor=\"#000000\",descriptionColor=\"#666666\",titleFont,descriptionFont,mobileVideoWidth=\"100%\",mobileVideoHeight=\"400px\",videoHeight=\"500px\",videoWidth=\"55%\"}=props;const visibleTabs=tabs.filter(tab=>tab.visible);const[activeIndex,setActiveIndex]=useState(0);const videoRef=useRef(null);const[isMobile,setIsMobile]=useState(false);const[isTablet,setIsTablet]=useState(false);const[cardHeight,setCardHeight]=useState(undefined);const cardRefs=useRef([]);// Check for mobile view\nuseState(()=>{if(typeof window!==\"undefined\"){const checkMobile=()=>{startTransition(()=>{setIsMobile(window.innerWidth<=800);setIsTablet(window.innerWidth>800&&window.innerWidth<=800);});};checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);}});if(visibleTabs.length===0){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor,padding:40},children:/*#__PURE__*/_jsx(\"p\",{style:{...descriptionFont,color:descriptionColor},children:\"No visible tabs\"})});}const activeTab=visibleTabs[activeIndex];useEffect(()=>{if(videoRef.current){videoRef.current.play().catch(error=>{console.log(\"Video autoplay failed:\",error);});}},[activeIndex]);useEffect(()=>{if(cardRefs.current.length>0){const heights=cardRefs.current.filter(ref=>ref!==null).map(ref=>ref.scrollHeight);const maxHeight=Math.max(...heights);startTransition(()=>setCardHeight(maxHeight));}},[visibleTabs]);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor,display:\"flex\",flexDirection:isMobile?\"column\":\"row\",gap:40,padding:isMobile?20:40,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:isMobile?\"100%\":\"45%\",display:\"flex\",flexDirection:\"column\",gap:16,minWidth:isMobile?\"auto\":300,justifyContent:isMobile?\"flex-start\":\"center\"},children:visibleTabs.map((tab,index)=>{const isActive=index===activeIndex;const isFirst=index===0;return /*#__PURE__*/_jsxs(\"div\",{ref:el=>{cardRefs.current[index]=el;},onClick:()=>startTransition(()=>setActiveIndex(index)),style:{backgroundColor:isActive?activeCardBackground:cardBackground,border:isActive?`1px solid ${borderColor}`:\"1px solid transparent\",borderRadius:8,padding:24,cursor:\"pointer\",transition:\"all 0.2s ease\",boxShadow:isActive?\"0 2px 8px rgba(0,0,0,0.08)\":\"0 1px 3px rgba(0,0,0,0.05)\",minHeight:cardHeight||120,display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,marginBottom:8,color:titleColor,...titleFont},children:tab.title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:descriptionColor,...descriptionFont},children:tab.description})]},index);})}),/*#__PURE__*/_jsx(\"div\",{style:{width:isMobile?\"100%\":videoWidth,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",minWidth:isMobile?\"auto\":300,borderRadius:8,overflow:\"hidden\",position:\"relative\",flexShrink:0},children:activeTab.showVideo&&/*#__PURE__*/_jsx(\"video\",{ref:videoRef,src:activeTab.videoUrl,poster:activeTab.imageUrl,style:{width:isMobile||isTablet?mobileVideoWidth:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius:8,display:\"block\"},\"aria-label\":activeTab.imageAlt},activeIndex)})]});}addPropertyControls(TabbedCards,{tabs:{type:ControlType.Array,title:\"Tabs\",control:{type:ControlType.Object,controls:{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Tab Title\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"Tab description text\",displayTextArea:true},imageUrl:{type:ControlType.String,title:\"Image URL\",defaultValue:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\"},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\"},imageAlt:{type:ControlType.String,title:\"Image Alt Text\",defaultValue:\"Media description\"},visible:{type:ControlType.Boolean,title:\"Visible\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showVideo:{type:ControlType.Boolean,title:\"Show Video\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"}}},defaultValue:[{title:\"Detailed Condition Reports & Defect Analysis\",description:\"A summary of the roof's overall condition, highlighting major findings and outlining any immediate steps to address the issues.\",imageUrl:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"Detailed roof condition report\",visible:true,showVideo:true},{title:\"High-Resolution drone photography\",description:\"We use the latest cameras, lenses, equipment to ensure photos are sharp, vibrant, and clear.\",imageUrl:\"https://framerusercontent.com/images/aNsAT3jCvt4zglbWCUoFe33Q.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"High-resolution drone photography\",visible:true,showVideo:true},{title:\"4K Drone Video Inspection\",description:\"Minimum 4K resolution videos provided\",imageUrl:\"https://framerusercontent.com/images/BYnxEV1zjYb9bhWh1IwBZ1ZoS60.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"4K drone video inspection\",visible:true,showVideo:true},{title:\"Interactive 3D Roof Models\",description:\"3D Models can be provided in range of formats DWG, DGN, IFC etc\",imageUrl:\"https://framerusercontent.com/images/2uTNEj5aTl2K3NJaEFWMbnrA.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"Interactive 3D roof models\",visible:true,showVideo:true},{title:\"High-Resolution Drone Map\",description:\"Ultra clear and sharp orthomosaic to view area of interest\",imageUrl:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",videoUrl:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",imageAlt:\"High-resolution drone map\",visible:true,showVideo:true}]},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},videoWidth:{type:ControlType.String,title:\"Video Width\",defaultValue:\"55%\",placeholder:\"e.g., 55%, 600px\"},videoHeight:{type:ControlType.String,title:\"Video Height\",defaultValue:\"500px\",placeholder:\"e.g., 500px, 100%\"},mobileVideoWidth:{type:ControlType.String,title:\"Mobile Video Width\",defaultValue:\"100%\",placeholder:\"e.g., 100%, 500px\"},cardBackground:{type:ControlType.Color,title:\"Card Background\",defaultValue:\"#F7F7F7\"},activeCardBackground:{type:ControlType.Color,title:\"Active Card\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#000000\"},descriptionColor:{type:ControlType.Color,title:\"Description Color\",defaultValue:\"#666666\"},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",displayFontSize:true,defaultValue:{fontSize:\"18px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},descriptionFont:{type:ControlType.Font,title:\"Description Font\",controls:\"extended\",defaultFontType:\"sans-serif\",displayFontSize:true,defaultValue:{fontSize:\"14px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.4em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TabbedCards\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TabbedCards.map"],"mappings":"+MAIG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,OAAK,CAAC,CAAC,MAAM,+CAA+C,YAAY,kIAAkI,SAAS,sEAAsE,SAAS,uEAAuE,SAAS,iCAAiC,QAAQ,GAAK,UAAU,GAAK,CAAC,CAAC,MAAM,oCAAoC,YAAY,+FAA+F,SAAS,oEAAoE,SAAS,uEAAuE,SAAS,oCAAoC,QAAQ,GAAK,UAAU,GAAK,CAAC,CAAC,MAAM,4BAA4B,YAAY,wCAAwC,SAAS,uEAAuE,SAAS,uEAAuE,SAAS,4BAA4B,QAAQ,GAAK,UAAU,GAAK,CAAC,CAAC,MAAM,6BAA6B,YAAY,kEAAkE,SAAS,oEAAoE,SAAS,uEAAuE,SAAS,6BAA6B,QAAQ,GAAK,UAAU,GAAK,CAAC,CAAC,MAAM,4BAA4B,YAAY,6DAA6D,SAAS,sEAAsE,SAAS,uEAAuE,SAAS,4BAA4B,QAAQ,GAAK,UAAU,GAAK,CAAC,CAAC,kBAAgB,UAAU,iBAAe,UAAU,uBAAqB,UAAU,cAAY,UAAU,aAAW,UAAU,mBAAiB,UAAU,YAAU,kBAAgB,mBAAiB,OAAO,oBAAkB,QAAQ,cAAY,QAAQ,aAAW,OAAO,EAAY,EAAY,EAAK,OAAO,GAAK,EAAI,QAAQ,CAAM,CAAC,EAAY,GAAgBA,EAAS,EAAE,CAAO,EAASC,EAAO,KAAK,CAAM,CAAC,EAAS,GAAaD,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAW,GAAeA,EAAS,IAAA,GAAU,CAAO,EAASC,EAAO,EAAE,CAAC,CAChjE,GAAzT,MAAa,CAAC,GAAU,IAAS,OAAY,CAAC,IAAM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