{"version":3,"file":"ClickableNames_2.khDfgwtL.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,2BAA2B,CAAC,CAAC,KAAK,aA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