{"version":3,"file":"StickyCourseBar_1.DBDUAcCC.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/lLIjvj1jP0clowREfLrd/eRraNm7VgKxV9AKAsXIu/StickyCourseBar_1.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer,RenderTarget}from\"framer\";import{motion}from\"framer-motion\";/**\n * Sticky Course Bar\n *\n * A bottom bar that slides in when scrolling past the first viewport\n * and slides out when scrolling back to top.\n *\n * @framerIntrinsicWidth 100%\n * @framerIntrinsicHeight 80\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StickyCourseBar(props){const{courseName=\"VOB/B Schulung\",nextDateLabel=\"N\\xe4chster Termin:\",nextDate=\"14. Sep 2026\",price=\"350,00 €\",priceSuffix=\"netto / Person\",buttonText=\"Termin sichern\",buttonLink=\"\",backgroundColor=\"#1a1a1f\",textColor=\"#ffffff\",secondaryTextColor=\"#9ca3af\",buttonBackgroundColor=\"#c9a227\",buttonTextColor=\"#1a1a1f\",buttonBorderRadius=50,showInPreview=true,font,buttonFont,animationDuration=.4,style}=props;const containerRef=useRef(null);const isStatic=useIsStaticRenderer();const isPreview=RenderTarget.current()===RenderTarget.preview;const isThumbnail=RenderTarget.current()===RenderTarget.thumbnail;const[isVisible,setIsVisible]=useState(false);const[isMobile,setIsMobile]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const checkMobile=()=>{startTransition(()=>setIsMobile(window.innerWidth<768));};checkMobile();window.addEventListener(\"resize\",checkMobile);return()=>window.removeEventListener(\"resize\",checkMobile);},[]);useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const handleScroll=()=>{const scrolled=window.scrollY>0;startTransition(()=>setIsVisible(scrolled));};// Check initial scroll position\nhandleScroll();window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",handleScroll);},[isStatic]);// Show bar based on:\n// - Canvas mode: showInPreview controls visibility\n// - Preview mode: showInPreview forces visible OR time-based visibility\n// - Thumbnail: always show\nlet displayVisible=isVisible;if(isThumbnail){displayVisible=true;}else if(isPreview){displayVisible=showInPreview||isVisible;}else if(isStatic){displayVisible=showInPreview;}const variants={hidden:{y:\"100%\",opacity:0},visible:{y:0,opacity:1}};return /*#__PURE__*/_jsx(motion.div,{ref:containerRef,initial:\"hidden\",animate:displayVisible?\"visible\":\"hidden\",variants:variants,transition:{duration:animationDuration,ease:[.25,.46,.45,.94]},style:{position:\"fixed\",bottom:0,left:0,right:0,zIndex:9999,backgroundColor,boxShadow:\"0 -4px 20px rgba(0, 0, 0, 0.15)\"},children:/*#__PURE__*/_jsxs(\"div\",{style:{maxWidth:\"1200px\",margin:\"0 auto\",padding:isMobile?\"12px\":\"12px 24px\",display:\"flex\",alignItems:\"center\",justifyContent:isMobile?\"space-between\":\"space-between\",gap:isMobile?\"12px\":\"24px\"},children:[!isMobile&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"32px\",flex:1},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:font?.fontSize||\"16px\",fontWeight:font?.fontWeight||600,fontFamily:font?.fontFamily,letterSpacing:font?.letterSpacing,lineHeight:font?.lineHeight||\"1.2\",whiteSpace:\"nowrap\"},children:courseName}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"6px\",whiteSpace:\"nowrap\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:secondaryTextColor,fontSize:\"14px\",fontWeight:font?.fontWeight||400,fontFamily:font?.fontFamily},children:nextDateLabel}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:\"14px\",fontWeight:font?.fontWeight||400,fontFamily:font?.fontFamily},children:nextDate})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"baseline\",gap:\"6px\",whiteSpace:\"nowrap\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:\"20px\",fontWeight:700,fontFamily:font?.fontFamily},children:price}),/*#__PURE__*/_jsx(\"span\",{style:{color:secondaryTextColor,fontSize:\"12px\",fontWeight:font?.fontWeight||400,fontFamily:font?.fontFamily},children:priceSuffix})]})]}),isMobile&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"baseline\",gap:\"4px\",whiteSpace:\"nowrap\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:\"22px\",fontWeight:700,fontFamily:font?.fontFamily},children:price}),/*#__PURE__*/_jsx(\"span\",{style:{color:secondaryTextColor,fontSize:\"11px\",fontWeight:font?.fontWeight||400,fontFamily:font?.fontFamily},children:priceSuffix})]}),/*#__PURE__*/_jsx(\"a\",{href:buttonLink||undefined,style:{display:\"inline-block\",backgroundColor:buttonBackgroundColor,color:buttonTextColor,border:\"none\",borderRadius:`${buttonBorderRadius}px`,padding:isMobile?\"12px 20px\":\"12px 28px\",fontSize:buttonFont?.fontSize||\"14px\",fontWeight:buttonFont?.fontWeight||600,fontFamily:buttonFont?.fontFamily,letterSpacing:buttonFont?.letterSpacing,cursor:\"pointer\",whiteSpace:\"nowrap\",transition:\"transform 0.2s ease, opacity 0.2s ease\",flexShrink:0,textDecoration:\"none\"},onMouseEnter:e=>{e.currentTarget.style.transform=\"scale(1.02)\";e.currentTarget.style.opacity=\"0.9\";},onMouseLeave:e=>{e.currentTarget.style.transform=\"scale(1)\";e.currentTarget.style.opacity=\"1\";},children:buttonText})]})});}addPropertyControls(StickyCourseBar,{courseName:{type:ControlType.String,title:\"Kursname\",defaultValue:\"VOB/B Schulung\",placeholder:\"Name der Schulung\"},nextDateLabel:{type:ControlType.String,title:\"Termin Label\",defaultValue:\"N\\xe4chster Termin:\",placeholder:\"z.B. N\\xe4chster Termin:\"},nextDate:{type:ControlType.String,title:\"Termin Datum\",defaultValue:\"14. Sep 2026\",placeholder:\"z.B. 14. Sep 2026\"},price:{type:ControlType.String,title:\"Preis\",defaultValue:\"350,00 €\",placeholder:\"z.B. 350,00 €\"},priceSuffix:{type:ControlType.String,title:\"Preis Suffix\",defaultValue:\"netto / Person\",placeholder:\"z.B. netto / Person\"},buttonText:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Termin sichern\",placeholder:\"z.B. Termin sichern\"},buttonLink:{type:ControlType.Link,title:\"Button Link\",defaultValue:\"\"},backgroundColor:{type:ControlType.Color,title:\"Hintergrund\",defaultValue:\"#1a1a1f\"},textColor:{type:ControlType.Color,title:\"Textfarbe\",defaultValue:\"#ffffff\"},secondaryTextColor:{type:ControlType.Color,title:\"Sekund\\xe4re Textfarbe\",defaultValue:\"#9ca3af\"},buttonBackgroundColor:{type:ControlType.Color,title:\"Button Hintergrund\",defaultValue:\"#c9a227\"},buttonTextColor:{type:ControlType.Color,title:\"Button Textfarbe\",defaultValue:\"#1a1a1f\"},font:{type:ControlType.Font,title:\"Schriftart\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"}},buttonFont:{type:ControlType.Font,title:\"Button Schriftart\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},animationDuration:{type:ControlType.Number,title:\"Animation Dauer\",defaultValue:.4,min:.1,max:2,step:.1,unit:\"s\"},buttonBorderRadius:{type:ControlType.Number,title:\"Button Radius\",defaultValue:50,min:0,max:50,step:1,unit:\"px\"},showInPreview:{type:ControlType.Boolean,title:\"Vorschaumodus\",defaultValue:true,enabledTitle:\"Anzeigen\",disabledTitle:\"Verbergen\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StickyCourseBar\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"100%\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"80\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyCourseBar_1.map"],"mappings":"gRAWG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,aAAW,iBAAiB,gBAAc,mBAAsB,WAAS,eAAe,QAAM,WAAW,cAAY,iBAAiB,aAAW,iBAAiB,aAAW,GAAG,kBAAgB,UAAU,YAAU,UAAU,qBAAmB,UAAU,wBAAsB,UAAU,kBAAgB,UAAU,qBAAmB,GAAG,gBAAc,GAAK,OAAK,aAAW,oBAAkB,GAAG,SAAO,EAAY,EAAaA,EAAO,IAAI,EAAQ,EAAS,EAAoB,EAAQ,EAAU,EAAa,QAAQ,IAAI,EAAa,QAAc,EAAY,EAAa,QAAQ,IAAI,EAAa,UAAe,CAAC,EAAU,GAAcC,EAAS,EAAK,EAAO,CAAC,EAAS,GAAaA,EAAS,EAAK,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAgB,CAAC,MAAoB,EAAY,EAAO,WAAW,GAAG,CAAC,CAAE,EAA8D,OAA5D,EAAY,EAAE,EAAO,iBAAiB,SAAS,CAAW,MAAY,EAAO,oBAAoB,SAAS,CAAW,CAAE,EAAE,CAAC,CAAC,EAAE,MAAc,CAAC,GAAG,GAAiB,IAAS,OAAY,OAAO,IAAM,MAAiB,CAAC,IAAM,EAAS,EAAO,QAAQ,EAAE,MAAoB,EAAa,CAAQ,CAAC,CAAE,EAChkC,OAA7E,EAAa,EAAE,EAAO,iBAAiB,SAAS,EAAa,CAAC,QAAQ,EAAI,CAAC,MAAY,EAAO,oBAAoB,SAAS,CAAY,CAAE,EAAE,CAAC,CAAQ,CAAC,EAIrJ,IAAI,EAAe,EAAgO,OAAnN,EAAa,EAAe,GAAc,EAAW,EAAe,GAAe,EAAmB,IAAU,EAAe,G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