{"version":3,"file":"LightboxItem.DcNSP-7Y.mjs","names":[],"sources":["https:/framerusercontent.com/modules/JPa2AuEn0icSxwZqF7aj/aXcsChGyySg818EiAu1f/LightboxItem.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerDisableUnlink\n */export default function LightboxItem(props){const{type=\"image\",image,imageFit=\"cover\",galleryTitle=\"Gallery Item\",textContent=\"Click to open\",targetType=\"image\",targetImage,targetUrl=\"\",galleryGroup=\"gallery-1\",styling={},style}=props;const{borderRadius=\"0px\",hoverOpacity=.85,backgroundColor=\"transparent\",boxShadow,textColor,font,textAlign=\"left\",cursor=\"pointer\"}=styling;const isCanvas=RenderTarget.current()===RenderTarget.canvas;// Resolve responsive image — handle both string and object formats\nconst imageSrc=typeof image===\"string\"?image:image?.src||\"\";const imageSrcSet=typeof image===\"object\"?image?.srcSet:undefined;const imageSizes=typeof image===\"object\"?image?.sizes:undefined;const hasImage=!!imageSrc;// Resolve the actual target based on targetType\nconst resolvedTarget=targetType===\"image\"?targetImage||\"\":targetUrl||\"\";// Build the href for runtime detection\nconst href=`pin.supply#glightbox&group=${encodeURIComponent(galleryGroup)}&type=component&targetType=${targetType}`;// Container styles\nconst containerStyle={...style,display:\"block\",width:\"100%\",height:\"100%\",textDecoration:\"none\",cursor,overflow:\"hidden\",borderRadius,backgroundColor,boxShadow:boxShadow||undefined,position:\"relative\",boxSizing:\"border-box\"};// Image styles\nconst imageStyle={width:\"100%\",height:\"100%\",objectFit:imageFit,display:\"block\",borderRadius};// Text styles — font control values take priority\nconst textStyle={display:\"block\",width:\"100%\",color:textColor,fontFamily:font?.fontFamily||undefined,fontStyle:font?.fontStyle||undefined,fontSize:font?.fontSize||16,fontWeight:font?.fontWeight||400,letterSpacing:font?.letterSpacing||\"0em\",lineHeight:font?.lineHeight||1.4,textAlign,wordBreak:\"break-word\"};// Canvas placeholder overlay\nconst canvasOverlay=isCanvas?/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,right:0,bottom:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",pointerEvents:\"none\",zIndex:1},children:!hasImage&&type===\"image\"&&/*#__PURE__*/_jsx(\"div\",{style:{background:\"url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22126%22 height=%22126%22><path id=%22a%22 d=%22M126 0v21.584L21.584 126H0v-17.585L108.415 0H126Zm0 108.414V126h-17.586L126 108.414Zm0-84v39.171L63.585 126H24.414L126 24.414Zm0 42v39.17L105.584 126h-39.17L126 66.414ZM105.586 0 0 105.586V66.415L66.415 0h39.171Zm-42 0L0 63.586V24.415L24.415 0h39.171Zm-42 0L0 21.586V0h21.586Z%22 fill=%22rgb(136, 136, 136, 0.2)%22 fill-rule=%22evenodd%22/></svg>')\"}})}):null;return /*#__PURE__*/_jsxs(\"a\",{href:href,\"data-gallery-item\":\"true\",\"data-gallery-target\":resolvedTarget,\"data-gallery-target-type\":targetType,\"data-gallery-group\":galleryGroup,\"data-gallery-title\":galleryTitle,style:containerStyle,onClick:isCanvas?e=>e.preventDefault():undefined,children:[canvasOverlay,type===\"image\"?hasImage?/*#__PURE__*/_jsx(\"img\",{src:imageSrc,srcSet:imageSrcSet,sizes:imageSizes,alt:galleryTitle,style:imageStyle,draggable:false}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",background:\"url('data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22126%22 height=%22126%22><path id=%22a%22 d=%22M126 0v21.584L21.584 126H0v-17.585L108.415 0H126Zm0 108.414V126h-17.586L126 108.414Zm0-84v39.171L63.585 126H24.414L126 24.414Zm0 42v39.17L105.584 126h-39.17L126 66.414ZM105.586 0 0 105.586V66.415L66.415 0h39.171Zm-42 0L0 63.586V24.415L24.415 0h39.171Zm-42 0L0 21.586V0h21.586Z%22 fill=%22rgb(136, 136, 136, 0.2)%22 fill-rule=%22evenodd%22/></svg>')\"}}):/*#__PURE__*/_jsx(\"span\",{style:textStyle,children:textContent}),/*#__PURE__*/_jsx(\"style\",{children:`\n        [data-gallery-item]:hover {\n          opacity: ${hoverOpacity} !important;\n          transition: opacity 0.2s ease;\n        }\n      `})]});}// ─── Property Controls ───────────────────────────────────\naddPropertyControls(LightboxItem,{// ─── Item Content ──────────────────────────────────────\ntype:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Type\",options:[\"image\",\"text\"],optionTitles:[\"Image\",\"Text\"],defaultValue:\"image\"},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:props=>props.type!==\"image\"},imageFit:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Fit\",options:[\"cover\",\"contain\",\"fill\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\"],defaultValue:\"cover\",hidden:props=>props.type!==\"image\"},textContent:{type:ControlType.String,title:\"Text\",defaultValue:\"Click to open\",hidden:props=>props.type!==\"text\"},// ─── Style (grouped object) ────────────────────────────\nstyling:{type:ControlType.Object,title:\"Style\",controls:{borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:0},hoverOpacity:{type:ControlType.Number,title:\"Hover Opacity\",defaultValue:.85,min:0,max:1,step:.05},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"transparent\"},boxShadow:{type:ControlType.BoxShadow,title:\"Box Shadow\",defaultValue:{x:0,y:0,blur:0,spread:0,color:\"transparent\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#888888\",hidden:(_,parent)=>parent.type!==\"text\"},font:{type:ControlType.Font,controls:\"extended\",displayFontSize:true,displayTextAlignment:false,defaultFontType:\"sans-serif\",defaultFontSize:\"14px\",hidden:(_,parent)=>parent.type!==\"text\"},textAlign:{type:ControlType.Enum,title:\"Alignment\",options:[\"left\",\"center\",\"right\"],optionIcons:[\"text-align-left\",\"text-align-center\",\"text-align-right\"],defaultValue:\"left\",displaySegmentedControl:true,hidden:(_,parent)=>parent.type!==\"text\"},cursor:{type:ControlType.Cursor,title:\"Cursor\",defaultValue:\"pointer\"}},description:\" \"},// ─── Gallery Settings ──────────────────────────────────\ngalleryGroup:{type:ControlType.String,title:\"Gallery Group\",defaultValue:\"gallery-1\",placeholder:\"gallery-1\"},galleryTitle:{type:ControlType.String,title:\"Caption\",defaultValue:\"\"},targetType:{type:ControlType.Enum,title:\"Target Type\",displaySegmentedControl:true,options:[\"image\",\"url\"],optionTitles:[\"Image\",\"URL\"],defaultValue:\"image\"},targetImage:{type:ControlType.Image,title:\"Target Image\",hidden:props=>props.targetType!==\"image\",description:\"You can connect CMS fields to this component to make the fields above dynamic. [Tutorials](https://pin.supply/image-and-video-lightbox-gallery-tutorial)\"},targetUrl:{type:ControlType.String,title:\"Target URL\",defaultValue:\"\",placeholder:\"https://youtube.com/watch?v=...\",hidden:props=>props.targetType!==\"url\",description:\"You can connect CMS fields to this component to make the fields above dynamic. [Tutorials](https://pin.supply/image-and-video-lightbox-gallery-tutorial)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LightboxItem\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LightboxItem.map"],"mappings":"0KAEG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,QAAQ,QAAM,WAAS,QAAQ,eAAa,eAAe,cAAY,gBAAgB,aAAW,QAAQ,cAAY,YAAU,GAAG,eAAa,YAAY,UAAQ,EAAE,CAAC,SAAO,EAAW,CAAC,eAAa,MAAM,eAAa,IAAI,kBAAgB,cAAc,YAAU,YAAU,OAAK,YAAU,OAAO,SAAO,WAAW,EAAc,EAAS,EAAa,SAAS,GAAG,EAAa,OACza,EAAS,OAAO,GAAQ,SAAS,EAAM,GAAO,KAAK,GAAS,EAAY,OAAO,GAAQ,SAAS,GAAO,OAAO,IAAA,G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