import{s as speak}from"./index2.js";import{s as state}from"./store2.js";const defaultOptions={dismissible:!1},createNotice=(e,t,s=defaultOptions)=>{"string"==typeof t&&(t={type:e,message:t,code:""}),(null==t?void 0:t.message)||(t.message=wp.i18n.__("Something went wrong. Please try again.","surecart")),state.type=e,t={...s,...t},speak(t.message,"assertive"),Object.keys(t).forEach((e=>{state[e]=t[e]}))},createErrorNotice=(e,t=defaultOptions)=>{createNotice("error",e,t)},createInfoNotice=(e,t=defaultOptions)=>{createNotice("info",e,t)},removeNotice=()=>{state.type="default",state.code="",state.message="",state.data={status:0,type:"",http_status:""},state.additional_errors=[]};export{createInfoNotice as a,createErrorNotice as c,removeNotice as r};