{"version":3,"file":"Alert_message.drcGiAMz.mjs","names":["useState","p","useRef","useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/1yEqT4yIW5HCDh4amtbt/hdmyubpOHLrurqFexu7J/Alert_message.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useState,useRef,useCallback}from\"react\";const C={text:\"var(--token-942c6ee4-7bbb-4d20-89b4-d20ba9d44a16, rgb(24, 29, 39))\",muted:\"var(--token-3d6134a5-2930-409d-85b6-8ad4d67cc345, rgb(83, 88, 98))\",dark:\"var(--token-07bf1106-5e6d-4ac8-ac0d-57613b0bc986, rgb(10, 13, 18))\",onDark:\"var(--token-d915c11f-f59a-4003-b046-70f03f1fc2d7, rgb(255, 255, 255))\",border:\"var(--token-7daa537e-9e7a-4ed2-a5bf-29c3f1fd0b52, rgb(233, 234, 235))\",surface:\"var(--token-0fa19174-92c9-4ad1-8dcf-34f1817fe613, rgb(250, 250, 250))\",darkHover:\"var(--token-87431244-a9f3-4e17-b2e9-10ce51f4e88b, rgb(31, 38, 51))\",surfaceHover:\"var(--token-b44aad5a-aed8-49ef-8497-aaf288733442, rgb(240, 242, 246))\"};const STORAGE_PREFIX=\"axoniq:alert:dismissed:\";const MOBILE_BP=640;const COLLAPSE_TRANSITION=\"max-height 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 220ms cubic-bezier(0.4, 0, 0.2, 1), transform 220ms cubic-bezier(0.4, 0, 0.2, 1), padding 220ms cubic-bezier(0.4, 0, 0.2, 1)\";function Hoverable(p){const[hover,setHover]=useState(false);const[active,setActive]=useState(false);const style={...p.baseStyle,...hover?p.hoverStyle:null,transform:active?\"scale(0.97)\":\"scale(1)\",transition:\"background-color 150ms ease, color 150ms ease, transform 150ms ease\"};const handlers={onMouseEnter:()=>setHover(true),onMouseLeave:()=>{setHover(false);setActive(false);},onMouseDown:()=>setActive(true),onMouseUp:()=>setActive(false)};if(p.as===\"a\"){return /*#__PURE__*/_jsx(\"a\",{href:p.href,style:style,...handlers,children:p.children});}return /*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":p.ariaLabel,onClick:p.onClick,style:style,...handlers,children:p.children});}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 72\n */export default function Alert(props){const{messageId,emoji,title,subtitle,cta1,cta2,showDismiss,style}=props;const storageKey=STORAGE_PREFIX+messageId;const[isMobile,setIsMobile]=useState(false);const[open,setOpen]=useState(true);const observerRef=useRef(null);const setRoot=useCallback(node=>{if(observerRef.current){observerRef.current.disconnect();observerRef.current=null;}if(!node)return;if(typeof ResizeObserver===\"undefined\"){if(typeof window!==\"undefined\"&&window.matchMedia){setIsMobile(window.matchMedia(\"(max-width: \"+MOBILE_BP+\"px)\").matches);}return;}const ro=new ResizeObserver(entries=>{const w=entries[0]?entries[0].contentRect.width:0;setIsMobile(w>0&&w<MOBILE_BP);});ro.observe(node);observerRef.current=ro;},[]);useEffect(()=>{return()=>{if(observerRef.current){observerRef.current.disconnect();observerRef.current=null;}};},[]);useEffect(()=>{try{setOpen(localStorage.getItem(storageKey)!==\"1\");}catch(e){}},[storageKey]);function dismiss(){try{localStorage.setItem(storageKey,\"1\");}catch(e){}setOpen(false);}const hasCTA1=!!(cta1&&cta1.text&&cta1.text.trim().length>0);const hasCTA2=!!(cta2&&cta2.text&&cta2.text.trim().length>0);const hasSubtitle=!!(subtitle&&subtitle.trim().length>0);const emojiNode=emoji?/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":true,style:{fontSize:24,lineHeight:1.4,fontWeight:700,flex:\"0 0 auto\"},children:emoji}):null;const titleNode=/*#__PURE__*/_jsx(\"div\",{style:{color:C.text,fontSize:14,lineHeight:\"20px\",fontWeight:600,textAlign:\"left\"},children:title});const subtitleNode=hasSubtitle?/*#__PURE__*/_jsx(\"div\",{style:{color:C.muted,fontSize:14,lineHeight:\"20px\",fontWeight:400,textAlign:\"left\"},children:subtitle}):null;const ctaGroup=hasCTA1||hasCTA2?/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:10,alignItems:\"center\",flex:\"0 0 auto\",flexWrap:\"wrap\"},children:[hasCTA1?/*#__PURE__*/_jsx(Hoverable,{as:\"a\",href:cta1.link||\"#\",baseStyle:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"8px 12px\",backgroundColor:C.dark,color:C.onDark,fontSize:14,lineHeight:\"20px\",fontWeight:500,borderRadius:8,textDecoration:\"none\",boxShadow:\"0px 1px 2px 0px rgba(10, 12, 18, 0.05), inset 0px -2px 0px 0px rgba(10, 12, 18, 0.05), inset 0px 0px 0px 1px rgba(10, 12, 18, 0.18)\"},hoverStyle:{backgroundColor:C.darkHover},children:cta1.text}):null,hasCTA2?/*#__PURE__*/_jsx(Hoverable,{as:\"a\",href:cta2.link||\"#\",baseStyle:{display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"8px 12px\",backgroundColor:\"transparent\",color:C.text,fontSize:14,lineHeight:\"20px\",fontWeight:500,borderRadius:8,textDecoration:\"none\"},hoverStyle:{backgroundColor:C.surfaceHover},children:cta2.text}):null]}):null;const dismissNode=showDismiss?/*#__PURE__*/_jsx(Hoverable,{as:\"button\",ariaLabel:\"Dismiss\",onClick:dismiss,baseStyle:{flex:\"0 0 auto\",width:28,height:28,padding:0,background:\"transparent\",border:\"none\",borderRadius:6,cursor:\"pointer\",color:C.muted,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\"},hoverStyle:{color:C.text,backgroundColor:C.surfaceHover},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"18\",y1:\"6\",x2:\"6\",y2:\"18\"}),/*#__PURE__*/_jsx(\"line\",{x1:\"6\",y1:\"6\",x2:\"18\",y2:\"18\"})]})}):null;const containerBase={...style,border:\"1px solid \"+C.border,borderRadius:8,background:C.surface,boxSizing:\"border-box\",overflow:\"hidden\",transformOrigin:\"top center\",fontFamily:'\"Geist\", \"Geist Placeholder\", sans-serif',textAlign:\"left\",width:\"100%\",transition:COLLAPSE_TRANSITION,maxHeight:open?500:0,opacity:open?1:0,transform:open?\"scaleY(1)\":\"scaleY(0.85)\",pointerEvents:open?\"auto\":\"none\",paddingTop:open?12:0,paddingBottom:open?12:0};const layoutStyle=isMobile?{display:\"flex\",flexDirection:\"column\",gap:8,paddingLeft:16,paddingRight:16,alignItems:\"stretch\"}:{display:\"flex\",gap:16,alignItems:\"center\",paddingLeft:24,paddingRight:24};return /*#__PURE__*/_jsx(\"div\",{ref:setRoot,role:\"status\",style:{...containerBase,...layoutStyle},children:isMobile?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\"},children:[emojiNode||/*#__PURE__*/_jsx(\"span\",{}),dismissNode]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:0},children:[titleNode,subtitleNode]}),ctaGroup]}):/*#__PURE__*/_jsxs(_Fragment,{children:[emojiNode,/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:0,flex:\"1 1 auto\",minWidth:0},children:[titleNode,subtitleNode]}),ctaGroup,dismissNode]})});}Alert.defaultProps={messageId:\"alert-v1\",emoji:\"🔊\",title:\"AF4 reaches end of life on June, 30 2026\",subtitle:\"We offer LTS and hands-on migration support.\",cta1:{text:\"Learn more\",link:\"/contact\"},cta2:{text:\"\",link:\"\"},showDismiss:true};addPropertyControls(Alert,{messageId:{type:ControlType.String,title:\"Message ID\",defaultValue:\"alert-v1\",description:\"Unique id for THIS message. Dismissal is remembered per id, so bump this whenever you publish a new message (even if the component looks identical) so previously-dismissed users see it.\"},emoji:{type:ControlType.String,title:\"Emoji\",defaultValue:\"🔊\",placeholder:\"🔊\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"AF4 reaches end of life on June, 30 2026\",displayTextArea:true},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"We offer LTS and hands-on migration support.\",displayTextArea:true,description:\"Optional. Hidden when empty.\"},cta1:{type:ControlType.Object,title:\"CTA 1\",controls:{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Learn more\"},link:{type:ControlType.Link,title:\"Link\"}}},cta2:{type:ControlType.Object,title:\"CTA 2\",controls:{text:{type:ControlType.String,title:\"Text\",defaultValue:\"\"},link:{type:ControlType.Link,title:\"Link\"}},description:\"Optional. Hidden when text is empty.\"},showDismiss:{type:ControlType.Boolean,title:\"Dismiss icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Alert\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"72\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"800\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Alert_message.map"],"mappings":"uNAA0kC,SAAS,EAAU,EAAE,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,GAAM,CAAM,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAO,EAAM,CAAC,GAAGC,EAAE,UAAU,GAAG,EAAMA,EAAE,WAAW,KAAK,UAAU,EAAO,cAAc,WAAW,WAAW,sEAAsE,CAAO,EAAS,CAAC,iBAAiB,EAAS,GAAK,CAAC,iBAAiB,CAAC,EAAS,GAAM,CAAC,EAAU,GAAM,EAAG,gBAAgB,EAAU,GAAK,CAAC,cAAc,EAAU,GAAM,CAAC,CAAyG,O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