{"version":3,"file":"header.Cbl2k2_I.mjs","names":["reactStringReplace","gradients"],"sources":["https:/framerusercontent.com/modules/4zwjGYIsEZmtYSKfzY5X/UUlEr3Xf093lpVnnl606/header.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import reactStringReplace from\"react-string-replace\";import{gradients,typography}from\"https://framerusercontent.com/modules/xGfhwtkQs2rQg46H46KV/1x5iRJzRoI5QHkiXoV0O/design_system.js\";import{addPropertyControls,ControlType}from\"framer\";function addGradient(string,target,gradient){return reactStringReplace(string,target,(match,i)=>{const style={backgroundImage:gradient,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\"};return /*#__PURE__*/_jsx(\"span\",{style:style,children:target});});}export default function Header(props){const{variant,role,text,textAlign,gradients}=props;const{tag:Tag,styles}=typography[role];const oldBreakpoint={XL:\"Desktop\",L:\"Desktop\",M:\"Tablet\",S:\"Mobile\"}[variant];const tagStyle={color:\"white\",textAlign,whiteSpace:\"pre-wrap\",marginBlockStart:0,marginBlockEnd:0,fontWeight:400,...styles[oldBreakpoint]};let content=text;for(const gradient of gradients){content=addGradient(content,gradient.text,gradient.colors);}return /*#__PURE__*/_jsx(Tag,{style:tagStyle,children:content});}addPropertyControls(Header,{variant:{type:ControlType.Enum,options:[\"XL\",\"L\",\"M\",\"S\"],defaultValue:\"XL\"},role:{type:ControlType.Enum,options:[\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\"],defaultValue:\"H1\"},text:{type:ControlType.String,defaultValue:\"Lorem ipsum\",displayTextArea:true},textAlign:{type:ControlType.Enum,options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true},gradients:{type:ControlType.Array,defaultValue:[],maxCount:3,control:{type:ControlType.Object,controls:{text:{type:ControlType.String,defaultValue:\"\"},colors:{type:ControlType.Enum,options:Object.values(gradients),optionTitles:Object.keys(gradients).map(key=>key.replace(/To/g,\" → \"))}}}}});\nexport const __FramerMetadata__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