{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/wtTrIHDoKDpN2ldWDIpN/uyJx9lRvpJkiq1cmQbod/MasterclassNotification.js"],
  "sourcesContent": ["// MasterclassNotification component that shows a countdown and displays \"Masterclass is starting now\" when it reaches zero\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function MasterclassNotification(props){const{duration=60,backgroundColor=\"#FFFFFF\",textColor=\"#000000\",messageColor=\"#FF0000\",font,messageFont,borderRadius=8,showMessage=true,customMessage=\"Masterclass is starting now\"}=props;const[timeLeft,setTimeLeft]=useState(duration);const[isFinished,setIsFinished]=useState(false);const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic)return;if(timeLeft<=0){startTransition(()=>setIsFinished(true));return;}const timer=setInterval(()=>{startTransition(()=>{setTimeLeft(prev=>{if(prev<=1){setIsFinished(true);return 0;}return prev-1;});});},1e3);return()=>clearInterval(timer);},[timeLeft,isStatic]);const formatTime=seconds=>{const mins=Math.floor(seconds/60);const secs=seconds%60;return`${mins.toString().padStart(2,\"0\")}:${secs.toString().padStart(2,\"0\")}`;};const isFixedWidth=props?.style&&props.style.width===\"100%\";if(isFinished&&showMessage){return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",...isFixedWidth?{...props?.style}:{minWidth:\"max-content\"},backgroundColor,borderRadius,padding:20,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",color:messageColor,...messageFont,boxShadow:\"0 2px 8px rgba(0,0,0,0.1)\"},children:customMessage});}return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,position:\"relative\",...isFixedWidth?{...props?.style}:{minWidth:\"max-content\"},backgroundColor,borderRadius,padding:20,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",color:textColor,...font,boxShadow:\"0 2px 8px rgba(0,0,0,0.1)\"},children:formatTime(timeLeft)});}addPropertyControls(MasterclassNotification,{duration:{type:ControlType.Number,title:\"Duration (seconds)\",defaultValue:60,min:1,max:3600,step:1},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"MasterclassNotification Color\",defaultValue:\"#000000\"},messageColor:{type:ControlType.Color,title:\"Message Color\",defaultValue:\"#FF0000\"},font:{type:ControlType.Font,title:\"MasterclassNotification Font\",defaultValue:{fontSize:\"32px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},messageFont:{type:ControlType.Font,title:\"Message Font\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},showMessage:{type:ControlType.Boolean,title:\"Show Message\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},customMessage:{type:ControlType.String,title:\"Custom Message\",defaultValue:\"Masterclass is starting now\",displayTextArea:true,hidden:({showMessage})=>!showMessage}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MasterclassNotification\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MasterclassNotification.map"],
  "mappings": "qHAIkB,SAARA,EAAyCC,EAAM,CAAC,GAAK,CAAC,SAAAC,EAAS,GAAG,gBAAAC,EAAgB,UAAU,UAAAC,EAAU,UAAU,aAAAC,EAAa,UAAU,KAAAC,EAAK,YAAAC,EAAY,aAAAC,EAAa,E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B,aAAAK,EAAa,QAAQ,GAAG,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,UAAU,SAAS,MAAMJ,EAAU,GAAGE,EAAK,UAAU,2BAA2B,EAAE,SAASgB,EAAWX,CAAQ,CAAC,CAAC,CAAE,CAACiB,EAAoB5B,EAAwB,CAAC,SAAS,CAAC,KAAK6B,EAAY,OAAO,MAAM,qBAAqB,aAAa,GAAG,IAAI,EAAE,IAAI,KAAK,KAAK,CAAC,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,EAAE,UAAU,CAAC,KAAKA,EAAY,MAAM,MAAM,gCAAgC,aAAa,SAAS,EAAE,aAAa,CAAC,KAAKA,EAAY,MAAM,MAAM,gBAAgB,aAAa,SAAS,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,+BAA+B,aAAa,CAAC,SAAS,OAAO,QAAQ,OAAO,cAAc,UAAU,WAAW,KAAK,EAAE,SAAS,WAAW,gBAAgB,YAAY,EAAE,YAAY,CAAC,KAAKA,EAAY,KAAK,MAAM,eAAe,aAAa,CAAC,SAAS,OAAO,QAAQ,WAAW,cAAc,UAAU,WAAW,OAAO,EAAE,SAAS,WAAW,gBAAgB,YAAY,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,gBAAgB,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,KAAK,IAAI,EAAE,YAAY,CAAC,KAAKA,EAAY,QAAQ,MAAM,eAAe,aAAa,GAAK,aAAa,OAAO,cAAc,MAAM,EAAE,cAAc,CAAC,KAAKA,EAAY,OAAO,MAAM,iBAAiB,aAAa,8BAA8B,gBAAgB,GAAK,OAAO,CAAC,CAAC,YAAApB,CAAW,IAAI,CAACA,CAAW,CAAC,CAAC",
  "names": ["MasterclassNotification", "props", "duration", "backgroundColor", "textColor", "messageColor", "font", "messageFont", "borderRadius", "showMessage", "customMessage", "timeLeft", "setTimeLeft", "ye", "isFinished", "setIsFinished", "isStatic", "useIsStaticRenderer", "ue", "Z", "timer", "prev", "formatTime", "seconds", "mins", "secs", "isFixedWidth", "p", "addPropertyControls", "ControlType"]
}
