{"version":3,"file":"CodeDemo.BeraOcrz.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,EAA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