{"version":3,"file":"CodeDemo.DOSkr6Yz.mjs","names":["useMemo","__esmMin","pe","init_npm_react_18_3_1","init_jsx_runtime","c","p","addPropertyControls","init_framer_DJ_0WPVq","ControlType","CodeDemo","props","lines","request","DEFAULT_REQUEST","radius","backgroundColor","borderColor","font","textColor","trimmed","line","rest","accentColor","index","key","keyIndex","before","value","queryColor","init_CodeDemo"],"sources":["https:/framerusercontent.com/modules/FnYdzDRIvvvv1w6Avy5o/Cfi5G8ob7mwIT2VFgCp0/CodeDemo.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";const DEFAULT_REQUEST=`GET /v1/salary\n  ?title=Software Engineer\n  &country=DE\n  &experience_years=5\n  &work_mode=remote\n  &employment_type=full_time\nAuthorization: Bearer sk_live_…`;/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function CodeDemo(props){const{request,accentColor,backgroundColor,borderColor,radius,textColor,queryColor,font}=props;const lines=useMemo(()=>(request||DEFAULT_REQUEST).split(\"\\n\"),[request]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"auto\",borderRadius:radius,background:backgroundColor,border:`1px solid ${borderColor}`,padding:20,boxSizing:\"border-box\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:font.fontFamily||'\"SFMono-Regular\", Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace',fontSize:font.fontSize,lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,fontWeight:font.fontWeight,fontStyle:font.fontStyle,textAlign:font.textAlign,color:textColor},children:lines.map((line,index)=>{const trimmed=line.trimStart();if(trimmed.startsWith(\"GET \")){const method=\"GET\";const rest=line.slice(line.indexOf(method)+method.length);return /*#__PURE__*/_jsxs(\"div\",{style:{whiteSpace:\"pre-wrap\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:accentColor},children:method}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor},children:rest})]},index);}if(trimmed.startsWith(\"Authorization:\")){const key=\"Authorization:\";const keyIndex=line.indexOf(key);const before=keyIndex>0?line.slice(0,keyIndex):\"\";const value=line.slice(keyIndex+key.length);return /*#__PURE__*/_jsxs(\"div\",{style:{whiteSpace:\"pre-wrap\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor},children:before}),/*#__PURE__*/_jsx(\"span\",{style:{color:accentColor},children:key}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor},children:value})]},index);}if(trimmed.startsWith(\"?\")||trimmed.startsWith(\"&\")){return /*#__PURE__*/_jsx(\"div\",{style:{whiteSpace:\"pre-wrap\",color:queryColor},children:line},index);}return /*#__PURE__*/_jsx(\"div\",{style:{whiteSpace:\"pre-wrap\"},children:line},index);})})});}addPropertyControls(CodeDemo,{request:{type:ControlType.String,title:\"Request\",defaultValue:DEFAULT_REQUEST,displayTextArea:true},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#29B3A2\"},backgroundColor:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#0F1720\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#23313B\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:14,min:0,max:40,step:1,unit:\"px\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#DDE5EC\"},queryColor:{type:ControlType.Color,title:\"Query\",defaultValue:\"#8FA0AF\"},font:{type:ControlType.Font,title:\"Code Font\",defaultValue:{fontSize:15,variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.7em\",textAlign:\"left\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CodeDemo\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutH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