{"version":3,"file":"ClickableNames_2.dUbROG0j.mjs","names":[],"sources":["https:/framerusercontent.com/modules/AgFfOOHXVBtoagt89k1F/arjKIyjmHZjhRp9OhEPe/ClickableNames_2.js"],"sourcesContent":["// Clickable Items component that displays items with names and links from CMS data\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ClickableItems(props){const{items=[{name:\"John Doe\",link:\"https://example.com/john\"},{name:\"Jane Smith\",link:\"https://example.com/jane\"},{name:\"Bob Johnson\",link:\"https://example.com/bob\"}],text=\"John Doe, Jane Smith, Bob Johnson\",textColor,hoverColor,font,spacing,newTab=false,fillContainer=false}=props;// Create a map of names to links for quick lookup\nconst nameToLinkMap=items.reduce((map,item)=>{map[item.name.toLowerCase().trim()]=item.link;return map;},{});// Parse the text field and create clickable elements\nconst renderClickableText=()=>{if(!text)return null;// Split by commas and process each name\nconst names=text.split(\",\").map(name=>name.trim());return names.map((name,index)=>{const link=nameToLinkMap[name.toLowerCase()];if(link){// If we have a matching link, render as clickable\nreturn /*#__PURE__*/_jsxs(\"span\",{children:[/*#__PURE__*/_jsx(\"a\",{href:link,target:newTab?\"_blank\":undefined,rel:newTab?\"noopener noreferrer\":undefined,style:{color:textColor,textDecoration:\"none\",cursor:\"pointer\",transition:\"color 0.2s ease\"},onMouseEnter:e=>{e.currentTarget.style.color=hoverColor;},onMouseLeave:e=>{e.currentTarget.style.color=textColor;},children:name}),index<names.length-1&&\", \"]},index);}else{// If no matching link, render as plain text\nreturn /*#__PURE__*/_jsxs(\"span\",{children:[name,index<names.length-1&&\", \"]},index);}});};return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",display:\"flex\",flexDirection:\"column\",gap:spacing,...fillContainer?{width:\"100%\",height:\"100%\"}:{width:\"max-content\",minWidth:\"max-content\"}},children:/*#__PURE__*/_jsx(\"div\",{style:{...font,color:textColor,width:fillContainer?\"100%\":\"max-content\",wordWrap:\"break-word\",whiteSpace:\"normal\"},children:renderClickableText()})});}addPropertyControls(ClickableItems,{fillContainer:{type:ControlType.Boolean,title:\"Fill Container\",defaultValue:false,enabledTitle:\"Fill\",disabledTitle:\"Fit Content\"},text:{type:ControlType.String,title:\"Text\",defaultValue:\"Header Text\",displayTextArea:true},items:{type:ControlType.Array,title:\"Items\",control:{type:ControlType.Object,controls:{name:{type:ControlType.String,title:\"Name\",defaultValue:\"Item Name\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"https://example.com\"}}},defaultValue:[{name:\"John Doe\",link:\"https://example.com/john\"},{name:\"Jane Smith\",link:\"https://example.com/jane\"},{name:\"Bob Johnson\",link:\"https://example.com/bob\"}]},newTab:{type:ControlType.Boolean,title:\"Open in New Tab\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#0099FF\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},spacing:{type:ControlType.Number,title:\"Spacing\",defaultValue:12,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ClickableItems\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ClickableNames_2.map"],"mappings":"8JAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,CAAC,KAAK,WAAW,KAAK,0BAA0B,EAAE,CAAC,KAAK,aA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