{"version":3,"file":"CodeDemo.D6cSnnDj.mjs","names":["useMemo"],"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\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CodeDemo.map"],"mappings":"iLASG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,UAAQ,cAAY,kBAAgB,cAAY,SAAO,YAAU,aAAW,QAAM,EAAY,EA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