{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/VljVKPPwk6JoSxVh6dUT/fLh3q3U5w8cnQ881KT0z/InlineImageText.js"],
  "sourcesContent": ["/**\n * For any website & code related support, contact Sam from wealthisteps.com at wealthistep@gmail.com\n * Linkedin - https://www.linkedin.com/in/samagramishra/\n * */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import*as React from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export function InlineImageText(props){const{text,images,font,color,styles,tag}=props;const segments=text.split(\"$$\");let imageIndex=0;// Create the component with the selected HTML tag\nconst TagName=tag||\"p\";// Function to render text with line breaks\nconst renderTextWithLineBreaks=text=>{return text.split(\"<br/>\").map((line,i)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[line,i<text.split(\"<br/>\").length-1&&/*#__PURE__*/_jsx(\"br\",{})]},i));};return /*#__PURE__*/_jsx(TagName,{style:{display:\"block\",fontSize:font.fontSize,fontFamily:font.fontFamily,fontWeight:font.fontWeight||\"normal\",lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,textAlign:font.textAlign,color:props.color,wordWrap:\"break-word\",margin:0},children:segments.map((segment,index)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[segment&&/*#__PURE__*/_jsx(\"span\",{children:renderTextWithLineBreaks(segment)}),index<segments.length-1&&images[imageIndex]&&/*#__PURE__*/_jsx(\"img\",{src:images[imageIndex++],alt:`inline-${index}`,style:{display:\"inline-block\",width:styles.imageWidth,height:styles.imageHeight,borderRadius:styles.imageRadius,objectFit:\"cover\",marginLeft:styles.gap,marginRight:styles.gap,verticalAlign:\"bottom\",transform:`translateY(${styles.offsetY||0}px)`,position:\"relative\"}})]},index))});}addPropertyControls(InlineImageText,{text:{type:ControlType.String,title:\"Text\",placeholder:\"Type something\u2026\",displayTextArea:true},tag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"p\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"],defaultValue:\"p\"},images:{type:ControlType.Array,title:\"Images\",propertyControl:{type:ControlType.Image}},font:{type:ControlType.Font,controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"},styles:{type:ControlType.Object,title:\"Style\",description:\"Developed by [Wealthisteps](https://wealthisteps.com/)\",controls:{gap:{type:ControlType.Number,title:\"Gap\",defaultValue:6},imageWidth:{type:ControlType.Number,title:\"Image Width\",defaultValue:24,min:1},imageHeight:{type:ControlType.Number,title:\"Image Height\",defaultValue:24,min:1},imageRadius:{type:ControlType.BorderRadius,title:\"Image Radius\"},offsetY:{type:ControlType.Number,title:\"Y Offset\",defaultValue:0,step:1,displayStepper:true}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"InlineImageText\":{\"type\":\"reactComponent\",\"name\":\"InlineImageText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InlineImageText.map"],
  "mappings": "uGAMU,SAASA,EAAgBC,EAAM,CAAC,GAAK,CAAC,KAAAC,EAAK,OAAAC,EAAO,KAAAC,EAAK,MAAAC,EAAM,OAAAC,EAAO,IAAAC,CAAG,EAAEN,EAAYO,EAASN,EAAK,MAAM,IAAI,EAAMO,EAAW,EAClIC,EAAQH,GAAK,IACbI,EAAyBT,GAAcA,EAAK,MAAM,OAAO,EAAE,IAAI,CAACU,EAAKC,IAAiBC,EAAYC,EAAS,CAAC,SAAS,CAACH,EAAKC,EAAEX,EAAK,MAAM,OAAO,EAAE,OAAO,GAAgBc,EAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAEH,CAAC,CAAC,EAAI,OAAoBG,EAAKN,EAAQ,CAAC,MAAM,CAAC,QAAQ,QAAQ,SAASN,EAAK,SAAS,WAAWA,EAAK,WAAW,WAAWA,EAA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MAAM,cAAc,aAAa,GAAG,IAAI,CAAC,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,eAAe,aAAa,GAAG,IAAI,CAAC,EAAE,YAAY,CAAC,KAAKA,EAAY,aAAa,MAAM,cAAc,EAAE,QAAQ,CAAC,KAAKA,EAAY,OAAO,MAAM,WAAW,aAAa,EAAE,KAAK,EAAE,eAAe,EAAI,CAAC,CAAC,CAAC,CAAC",
  "names": ["InlineImageText", "props", "text", "images", "font", "color", "styles", "tag", "segments", "imageIndex", "TagName", "renderTextWithLineBreaks", "line", "i", "u", "x", "p", "segment", "index", "addPropertyControls", "ControlType"]
}
