{"version":3,"file":"ToastMessage.HYNlklMa.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/xrDhHdDZqjf2UicJbYgR/ad6PlDjIIjbQKjzEh4J7/ToastMessage.js"],"sourcesContent":["// ToastMessage message component with dismiss button\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * ToastMessage Message\n *\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 60\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ToastMessage(props){const{message,background,textColor,borderRadius,font,buttonLabel,buttonColor,buttonTextColor,buttonFont,style}=props;const[visible,setVisible]=useState(true);if(!visible||RenderTarget.current()===RenderTarget.thumbnail)return null;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",minWidth:0,maxWidth:\"100%\",width:\"100%\",background,color:textColor,borderRadius,boxShadow:\"0 2px 12px rgba(0,0,0,0.10)\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",padding:\"16px 20px\",gap:16,...font},role:\"status\",\"aria-live\":\"polite\",children:[/*#__PURE__*/_jsx(\"span\",{style:{flex:1,minWidth:0,...font},children:message}),/*#__PURE__*/_jsx(\"button\",{style:{marginLeft:16,background:buttonColor,color:buttonTextColor,border:\"none\",borderRadius:6,padding:\"8px 16px\",cursor:\"pointer\",...buttonFont},onClick:()=>startTransition(()=>setVisible(false)),\"aria-label\":\"Dismiss\",children:buttonLabel})]});}addPropertyControls(ToastMessage,{message:{type:ControlType.String,title:\"Message\",defaultValue:\"This is a toast message.\",displayTextArea:true},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#222222\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#fff\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Dismiss\"},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#fff\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#222222\"},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ToastMessage\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"320\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"60\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ToastMessage.map"],"mappings":"+LASG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,UAAQ,aAAW,YAAU,eAAa,OAAK,cAAY,cAAY,kBAAgB,aAAW,SAAO,EAAW,CAAC,EAAQ,GAAYA,EAAS,GAAK,CAA0E,MAAtE,CAAC,GAAS,EAAa,SAAS,GAAG,EAAa,UAAiB,KAAyB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,SAAS,EAAE,SAAS,OAAO,MAAM,OAAO,aAAW,MAAM,EAAU,eAAa,UAAU,8BAA8B,QAAQ,OAAO,WAAW,SAAS,eAAe,gBAAgB,QAAQ,YAAY,IAAI,GAAG,GAAG,EAAK,CAAC,KAAK,SAAS,YAAY,SAAS,SAAS,CAAc,EAAK,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAK,CAAC,SAAS,EAAQ,CAAC,CAAc,EAAK,SAAS,C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