{"version":3,"file":"GradientText.D8RxJKy2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/23p2soLbGzfRoGSrMpbA/duyAQEGi5MNYRpOlGLyN/GradientText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";function GradientText(props){const{text=\"Understand how AI talks about your brand\",textDK=\"\",highlightWords=\"AI talks\",highlightWordsDK=\"\",baseColor=\"rgb(2, 10, 15)\",highlightColor1=\"rgb(94, 67, 217)\",highlightColor2=\"rgb(27, 101, 190)\",fontSize=64,fontWeight=600,lineHeight=1.2,textAlign=\"center\",tag=\"h1\",style}=props;// Reactive locale detection. Framer re-renders this component whenever\n// the active locale changes, so EN/DK switching no longer needs a refresh.\nconst localeInfo=useLocaleInfo();const slug=(localeInfo?.activeLocale?.slug||\"\").toLowerCase();const code=(localeInfo?.activeLocale?.code||\"\").toLowerCase();const isDK=slug===\"da\"||slug===\"dk\"||slug===\"da-dk\"||code===\"da\"||code===\"da-dk\"||// Fallback: covers any preview path-based routing or environments\n// where useLocaleInfo doesn't yet expose the active locale.\ntypeof window!==\"undefined\"&&(window.location.pathname.startsWith(\"/dk/\")||window.location.pathname===\"/dk\");const activeText=isDK&&textDK?textDK:text;const activeHighlightWords=isDK&&highlightWordsDK?highlightWordsDK:highlightWords;const highlights=activeHighlightWords.split(\",\").map(w=>w.trim()).filter(Boolean);const Tag=tag;const renderText=()=>{if(highlights.length===0)return activeText;let remaining=activeText;const parts=[];let keyIndex=0;for(const word of highlights){const idx=remaining.toLowerCase().indexOf(word.toLowerCase());if(idx===-1)continue;if(idx>0){parts.push(/*#__PURE__*/_jsx(\"span\",{children:remaining.substring(0,idx)},keyIndex++));}parts.push(/*#__PURE__*/_jsx(\"span\",{style:{background:`linear-gradient(135deg, ${highlightColor1}, ${highlightColor2})`,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\"},children:remaining.substring(idx,idx+word.length)},keyIndex++));remaining=remaining.substring(idx+word.length);}if(remaining){parts.push(/*#__PURE__*/_jsx(\"span\",{children:remaining},keyIndex++));}return parts.length>0?parts:activeText;};return /*#__PURE__*/_jsx(Tag,{style:{margin:0,fontFamily:\"'Inter', sans-serif\",fontSize,fontWeight,lineHeight,textAlign,color:baseColor,letterSpacing:\"-0.02em\",...style},children:renderText()});}addPropertyControls(GradientText,{text:{title:\"Text\",type:ControlType.String,defaultValue:\"Understand how AI talks about your brand\"},textDK:{title:\"Text\",type:ControlType.String,defaultValue:\"\",description:\"Danish (DK) version of the text. Leave empty to use EN.\"},highlightWords:{title:\"Highlight Words\",type:ControlType.String,defaultValue:\"AI talks\",description:\"Comma-separated words to highlight (EN)\"},highlightWordsDK:{title:\"Highlight Words\",type:ControlType.String,defaultValue:\"\",description:\"Comma-separated words to highlight (DK). Leave empty to use EN.\"},baseColor:{title:\"Base Color\",type:ControlType.Color,defaultValue:\"rgb(2, 10, 15)\"},highlightColor1:{title:\"Gradient Start\",type:ControlType.Color,defaultValue:\"rgb(94, 67, 217)\"},highlightColor2:{title:\"Gradient End\",type:ControlType.Color,defaultValue:\"rgb(27, 101, 190)\"},fontSize:{title:\"Font Size\",type:ControlType.Number,defaultValue:64,min:12,max:120,step:1},fontWeight:{title:\"Font Weight\",type:ControlType.Number,defaultValue:600,min:100,max:900,step:100},lineHeight:{title:\"Line Height\",type:ControlType.Number,defaultValue:1.2,min:.8,max:2,step:.05},textAlign:{title:\"Text Align\",type:ControlType.Enum,defaultValue:\"center\",options:[\"left\",\"center\",\"right\"],displaySegmentedControl:true},tag:{title:\"HTML Tag\",type:ControlType.Enum,defaultValue:\"h1\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"p\"]}});export default GradientText;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMapping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