{"version":3,"file":"HeaderBlue.ortsWH_T.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/fIyB8hmMUltbEO9u2EfH/tfvoku8pKvsdIGXX15Wb/HeaderBlue.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * RecovrHero (Framer)\n * A reusable navy-gradient header that matches the Recovr theme across pages.\n * Every text field, button, and badge is editable from the right-hand panel.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicHeight 180\n */// ─── Color Tokens ─────────────────────────────────────────\nconst C={navy:\"#0B1D35\",navyMid:\"#1A3358\",white:\"#FFFFFF\"};const FONT=\"'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif\";// ─── Responsive helper ───────────────────────────────────\nfunction useNarrow(bp=720){const[n,setN]=React.useState(false);React.useEffect(()=>{const fn=()=>setN(window.innerWidth<bp);fn();window.addEventListener(\"resize\",fn);return()=>window.removeEventListener(\"resize\",fn);},[bp]);return n;}// ─── Title size presets ──────────────────────────────────\nconst TITLE_SIZES={Small:{desktop:22,mobile:19},Medium:{desktop:28,mobile:22},Large:{desktop:34,mobile:26}};// ─── Main Component ──────────────────────────────────────\nexport function RecovrHero({title=\"Where does it hurt?\",subtitle=\"Tap a body region to see related injuries and what to do next.\",note=\"\",titleSize=\"Medium\",showBackButton=false,backFallbackPath=\"/\",badgeText=\"\",badgeColor=\"#1D6BF3\",rightButtonText=\"\",rightButtonHref=\"\",bgColorStart=C.navy,bgColorEnd=C.navyMid,titleColor=C.white,cornerRadius=20}){const narrow=useNarrow();// Inject DM Sans once (shared id with the other Recovr components)\nReact.useEffect(()=>{if(document.getElementById(\"recovr-font\"))return;const el=document.createElement(\"link\");el.id=\"recovr-font\";el.rel=\"stylesheet\";el.href=\"https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&display=swap\";document.head.appendChild(el);},[]);const onBack=()=>{if(typeof window===\"undefined\")return;if(window.history.length>1)window.history.back();else window.location.href=backFallbackPath||\"/\";};const onRightButton=()=>{if(typeof window===\"undefined\")return;if(rightButtonHref)window.location.href=rightButtonHref;};const sizes=TITLE_SIZES[titleSize]||TITLE_SIZES.Medium;const fontSize=narrow?sizes.mobile:sizes.desktop;const hasTopRow=showBackButton||!!badgeText;const hasSubtitle=!!subtitle&&subtitle.trim().length>0;const hasNote=!!note&&note.trim().length>0;const hasRightButton=!!rightButtonText&&rightButtonText.trim().length>0;return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",background:`linear-gradient(135deg, ${bgColorStart} 0%, ${bgColorEnd} 100%)`,borderRadius:cornerRadius,padding:narrow?\"18px 18px 16px\":\"24px 28px 22px\",boxShadow:\"0 4px 20px rgba(11,29,53,0.18)\",boxSizing:\"border-box\",fontFamily:FONT},children:[hasTopRow&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:12,marginBottom:14,flexWrap:\"wrap\"},children:[showBackButton&&/*#__PURE__*/_jsx(\"button\",{onClick:onBack,style:{background:\"rgba(255,255,255,0.1)\",border:\"1px solid rgba(255,255,255,0.22)\",borderRadius:10,color:\"rgba(255,255,255,0.9)\",padding:\"8px 14px\",cursor:\"pointer\",fontWeight:600,fontSize:13,fontFamily:FONT,flexShrink:0,transition:\"background 0.15s\"},onMouseOver:e=>e.currentTarget.style.background=\"rgba(255,255,255,0.18)\",onMouseOut:e=>e.currentTarget.style.background=\"rgba(255,255,255,0.1)\",children:\"← Back\"}),!!badgeText&&/*#__PURE__*/_jsx(\"span\",{style:{background:`${badgeColor}55`,border:`1px solid ${badgeColor}80`,borderRadius:20,padding:\"4px 12px\",fontSize:11,fontWeight:700,color:\"rgba(255,255,255,0.95)\",letterSpacing:\"0.07em\",textTransform:\"uppercase\"},children:badgeText})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-end\",justifyContent:\"space-between\",gap:14,flexWrap:\"wrap\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,minWidth:200},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize,fontWeight:800,color:titleColor,lineHeight:1.1,letterSpacing:\"-0.02em\"},children:title}),hasSubtitle&&/*#__PURE__*/_jsx(\"p\",{style:{margin:\"8px 0 0 0\",color:\"rgba(255,255,255,0.7)\",fontSize:narrow?13:14,lineHeight:1.6},children:subtitle}),hasNote&&/*#__PURE__*/_jsx(\"p\",{style:{margin:\"10px 0 0 0\",color:\"rgba(255,255,255,0.5)\",fontSize:12,lineHeight:1.55},children:note})]}),hasRightButton&&/*#__PURE__*/_jsx(\"button\",{onClick:onRightButton,style:{background:\"rgba(255,255,255,0.1)\",border:\"1px solid rgba(255,255,255,0.22)\",borderRadius:10,color:C.white,padding:\"10px 16px\",cursor:\"pointer\",fontWeight:600,fontSize:13,fontFamily:FONT,flexShrink:0,transition:\"background 0.15s\"},onMouseOver:e=>e.currentTarget.style.background=\"rgba(255,255,255,0.18)\",onMouseOut:e=>e.currentTarget.style.background=\"rgba(255,255,255,0.1)\",children:rightButtonText})]})]});}// ─── Property Controls (right-side panel in Framer) ──────\naddPropertyControls(RecovrHero,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Where does it hurt?\",displayTextArea:true},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"Tap a body region to see related injuries and what to do next.\",displayTextArea:true},note:{type:ControlType.String,title:\"Small note\",defaultValue:\"\",displayTextArea:true,description:\"Optional smaller text under the subtitle. Leave empty to hide.\"},titleSize:{type:ControlType.Enum,title:\"Title size\",options:[\"Small\",\"Medium\",\"Large\"],defaultValue:\"Medium\"},// ── Back button group\nshowBackButton:{type:ControlType.Boolean,title:\"Back button\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},backFallbackPath:{type:ControlType.String,title:\"Back fallback\",defaultValue:\"/\",hidden:props=>!props.showBackButton,description:\"Where to go if there's no browser history.\"},// ── Badge group\nbadgeText:{type:ControlType.String,title:\"Badge text\",defaultValue:\"\",description:\"e.g. 'Head' or 'Knee'. Leave empty to hide.\"},badgeColor:{type:ControlType.Color,title:\"Badge color\",defaultValue:\"#1D6BF3\",hidden:props=>!props.badgeText},// ── Right button group\nrightButtonText:{type:ControlType.String,title:\"Right button\",defaultValue:\"\",description:\"Optional button label, e.g. 'Change answers'. Empty hides it.\"},rightButtonHref:{type:ControlType.String,title:\"Right button link\",defaultValue:\"\",hidden:props=>!props.rightButtonText},// ── Appearance\nbgColorStart:{type:ControlType.Color,title:\"BG gradient start\",defaultValue:C.navy},bgColorEnd:{type:ControlType.Color,title:\"BG gradient end\",defaultValue:C.navyMid},titleColor:{type:ControlType.Color,title:\"Title color\",defaultValue:C.white},cornerRadius:{type:ControlType.Number,title:\"Corner radius\",defaultValue:20,min:0,max:40,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"RecovrHero\":{\"type\":\"reactComponent\",\"name\":\"RecovrHero\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HeaderBlue.map"],"mappings":"sMAUA,SAAS,EAAU,EAAG,IAAI,CAAC,GAAK,CAAC,EAAE,GAAMA,EAAe,GAAM,CAAkK,OAAjK,MAAoB,CAAC,IAAM,MAAO,EAAK,EAAO,WAAW,EAAG,CAA2C,OAA1C,GAAI,CAAC,EAAO,iBAAiB,SAAS,EAAG,KAAW,EAAO,oBAAoB,SAAS,EAAG,EAAG,CAAC,EAAG,CAAC,CAAQ,EAEvO,SAAgB,EAAW,CAAC,QAAM,sBAAsB,WAAS,iEAAiE,OAAK,GAAG,YAAU,SAAS,iBAAe,GAAM,mBAAiB,IAAI,YAAU,GAAG,aAAW,UAAU,kBAAgB,GAAG,kBAAgB,GAAG,eAAa,EAAE,KAAK,aAAW,EAAE,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