{"version":3,"file":"MessageToaster.CvqBbO2h.mjs","names":[],"sources":["https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/PXKjjm8mjRZVV1zoKlcV/hFqLyMX0Ly6kKieLDFfh/MessageToaster.js"],"sourcesContent":["/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import React from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({title:\"\",message:\"\",points:\"\",description:\"\",type:\"\",reason:\"\",color:\"\"});export function withMessageToastTitle(Component){return props=>{const[store]=useStore();return!store.title?/*#__PURE__*/_jsx(Component,{...props,text:props.text}):/*#__PURE__*/_jsx(Component,{...props,text:store.title});};}export function withMessageToastMessage(Component){return props=>{const[store]=useStore();return!store.message?/*#__PURE__*/_jsx(Component,{...props,text:props.text}):/*#__PURE__*/_jsx(Component,{...props,text:store.message});};}export function withMessageToastPoints(Component){return props=>{const[store]=useStore();return!store.points?/*#__PURE__*/_jsx(Component,{...props,text:props.text}):/*#__PURE__*/_jsx(Component,{...props,text:String(store.points)});};}export function withMessageToastReason(Component){return props=>{const[store]=useStore();return!store.reason?/*#__PURE__*/_jsx(Component,{...props,text:props.text}):/*#__PURE__*/_jsx(Component,{...props,text:store.reason});};}export function withMessageToastDescription(Component){return props=>{const[store]=useStore();return!store.description?/*#__PURE__*/_jsx(Component,{...props,text:props.text}):/*#__PURE__*/_jsx(Component,{...props,text:store.description});};}export function withMessageToastColor(Component){return props=>{const[store]=useStore();return!store.color?/*#__PURE__*/_jsx(Component,{...props,color:props.color}):/*#__PURE__*/_jsx(Component,{...props,color:store.color});};}export function withMessageToastContent(Component){return props=>{const[store,setStore]=useStore();React.useEffect(()=>{// Generic message handler for any type\nconst handleMessage=event=>{const{title,message,points,description,type,reason,color}=event.detail;setStore({title,message,points,description,type,reason,color});};// Listen for any message event with pattern: *Message\nconst messageTypes=[\"successMessage\",\"errorMessage\",\"defaultMessage\",\"warningMessage\",\"achievementMessage\",\"points-added\",\"favorited\",\"unfavorited\"];// Add listeners for all message types\nmessageTypes.forEach(eventType=>{window.addEventListener(eventType,handleMessage);});return()=>{// Remove all listeners\nmessageTypes.forEach(eventType=>{window.removeEventListener(eventType,handleMessage);});};},[]);return /*#__PURE__*/_jsx(Component,{...props,type:store.type,// Pass the type directly as variant without mapping\nvariant:store.type||props.variant,// Pass the color directly without mapping\ncolor:store.color||props.color});};}export function withMessageToastRedeem(Component){return props=>{const handleRedeem=()=>{const event=new CustomEvent(\"redeem\");window.dispatchEvent(event);};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleRedeem});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withMessageToastReason\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastReason\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastColor\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastDescription\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastDescription\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastContent\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastContent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastMessage\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastMessage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastTitle\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastPoints\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastPoints\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMessageToastRedeem\":{\"type\":\"reactHoc\",\"name\":\"withMessageToastRedeem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__Framer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