import{Xt as e}from"./630ba094.L_X-5TXi.js";import{Qu as t,xO as o}from"./6ec9a0fa.rdcQt2v8.js";function a(){const{observability:a,source:r,shopPay:n}=o();return{openModal:e(e=>{n.user.isUnauthenticatedUser.value?n.session.unstable_setUnauthenticatedErrorModal(e):a.error(new t("Cannot open an unauthenticated error modal outside of the unauthenticated flow",{groupingHash:"ShopPayError::UnauthenticatedErrorModal"}),{severity:"error",metadata:{source:{type:r.type},checkout:{token:r.checkoutSessionIdentifier||r.sourceId},event:{modalType:e.type,shopPayFlow:n.user.flow.value}}})},[a,r,n])}}export{a as t};