{"version":3,"file":"IframeWithGradient.CPkImUda.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/UsTrDDiTvXXxt6lVuA3B/nyLIoP4rLV3bacSxxQ5g/IframeWithGradient.js"],"sourcesContent":["// iframe component with black gradient at the bottom, title on the left hand side\n// add property to adjust shadow effect\n// add property to adjust radius\n// add lazy load function where iframe loads only once user clicks on the iframe\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function IframeWithGradient(props){const{url=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2483.5!2d-0.1!3d51.5!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNTHCsDMwJzAwLjAiTiAwwrAwNicwMC4wIlc!5e0!3m2!1sen!2suk!4v1234567890\",title=\"Royal Regency\",borderRadius=16,shadowIntensity=.15,titleFont,titleColor=\"#FFFFFF\",gradientHeight=30,gradientDarkness=1,placeholderType=\"gradient\",placeholderImage=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",placeholderVideo=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",overlayOpacity=.25,interactFont}=props;const[isLoaded,setIsLoaded]=useState(false);const handleClick=()=>{startTransition(()=>{setIsLoaded(true);});};const boxShadow=`0 4px 20px rgba(0, 0, 0, ${shadowIntensity})`;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:`${borderRadius}px`,overflow:\"hidden\",boxShadow:boxShadow},children:[!isLoaded&&/*#__PURE__*/_jsxs(\"div\",{onClick:handleClick,style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,background:placeholderType===\"gradient\"?\"linear-gradient(135deg, #667eea 0%, #764ba2 100%)\":\"transparent\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",zIndex:10,overflow:\"hidden\"},children:[placeholderType===\"image\"&&/*#__PURE__*/_jsx(\"img\",{src:placeholderImage,alt:\"Placeholder\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\"}}),placeholderType===\"image\"&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:`rgba(0, 0, 0, ${overlayOpacity})`,pointerEvents:\"none\"}}),placeholderType===\"video\"&&/*#__PURE__*/_jsx(\"video\",{src:placeholderVideo,autoPlay:true,loop:true,muted:true,playsInline:true,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\"}}),placeholderType===\"video\"&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:`rgba(0, 0, 0, ${overlayOpacity})`,pointerEvents:\"none\"}}),(placeholderType===\"image\"||placeholderType===\"video\")&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, calc(-50% + 80px))\",color:\"#FFFFFF\",padding:\"8px 12px\",borderRadius:\"6px\",zIndex:2,pointerEvents:\"none\",whiteSpace:\"nowrap\",...interactFont},children:\"Click to interact\"}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"80px\",height:\"80px\",borderRadius:\"50%\",backgroundColor:\"rgba(255, 255, 255, 0.9)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",boxShadow:\"0 4px 12px rgba(0, 0, 0, 0.2)\",position:\"relative\",zIndex:1},children:/*#__PURE__*/_jsx(\"svg\",{width:\"32\",height:\"32\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"#667eea\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"polygon\",{points:\"5 3 19 12 5 21 5 3\",fill:\"#667eea\"})})})]}),isLoaded&&/*#__PURE__*/_jsx(\"iframe\",{src:url,style:{width:\"100%\",height:\"100%\",border:\"none\",display:\"block\"},title:title,loading:\"lazy\",allowFullScreen:true}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:0,left:0,right:0,height:`${gradientHeight}%`,background:`linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, ${.1*gradientDarkness}) 10%, rgba(0, 0, 0, ${.2*gradientDarkness}) 20%, rgba(0, 0, 0, ${.3*gradientDarkness}) 30%, rgba(0, 0, 0, ${.4*gradientDarkness}) 40%, rgba(0, 0, 0, ${.5*gradientDarkness}) 50%, rgba(0, 0, 0, ${.6*gradientDarkness}) 60%, rgba(0, 0, 0, ${.7*gradientDarkness}) 70%, rgba(0, 0, 0, ${.8*gradientDarkness}) 80%, rgba(0, 0, 0, ${.9*gradientDarkness}) 90%, rgba(0, 0, 0, ${1*gradientDarkness}) 100%)`,pointerEvents:\"none\",display:\"flex\",alignItems:\"flex-end\",padding:\"24px\",gap:\"12px\"},children:/*#__PURE__*/_jsx(\"span\",{style:{color:titleColor,...titleFont,margin:0},children:title})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",bottom:0,left:0,right:0,height:\"15%\",pointerEvents:\"auto\",zIndex:5}})]});}addPropertyControls(IframeWithGradient,{url:{type:ControlType.String,title:\"URL\",defaultValue:\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2483.5!2d-0.1!3d51.5!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNTHCsDMwJzAwLjAiTiAwwrAwNicwMC4wIlc!5e0!3m2!1sen!2suk!4v1234567890\",placeholder:\"Enter iframe URL...\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Royal Regency\"},placeholderType:{type:ControlType.Enum,title:\"Placeholder Type\",options:[\"gradient\",\"image\",\"video\"],optionTitles:[\"Gradient\",\"Image\",\"Video\"],defaultValue:\"gradient\",displaySegmentedControl:true},placeholderImage:{type:ControlType.String,title:\"Image URL\",defaultValue:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",placeholder:\"Enter image URL...\",hidden:({placeholderType})=>placeholderType!==\"image\"},placeholderVideo:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",placeholder:\"Enter video URL...\",hidden:({placeholderType})=>placeholderType!==\"video\"},overlayOpacity:{type:ControlType.Number,title:\"Overlay Opacity\",defaultValue:.25,min:0,max:1,step:.05,hidden:({placeholderType})=>placeholderType===\"gradient\"},interactFont:{type:ControlType.Font,title:\"Interact Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},hidden:({placeholderType})=>placeholderType===\"gradient\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},shadowIntensity:{type:ControlType.Number,title:\"Shadow Intensity\",defaultValue:.15,min:0,max:1,step:.05},gradientHeight:{type:ControlType.Number,title:\"Gradient Height\",defaultValue:30,min:10,max:60,step:5,unit:\"%\"},gradientDarkness:{type:ControlType.Number,title:\"Gradient Darkness\",defaultValue:1,min:.1,max:1.5,step:.1},titleFont:{type:ControlType.Font,title:\"Title Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},titleColor:{type:ControlType.Color,title:\"Title Color\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IframeWithGradient\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__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