import{Xt as o}from"./630ba094.L_X-5TXi.js";import{xO as r}from"./6ec9a0fa.rdcQt2v8.js";var e=()=>{const{shop:{hasStorefront:e},observability:t,url:a}=r();return{replaceShopPayInHistory:o(o=>{"undefined"!=typeof window&&(o?window.location.replace(o):e?(t.log("shop_pay_in_history_storefront_redirected","[Shop Pay] Redirecting to storefront url, as replacementUrl is not provided"),window.location.replace(a.returnToStorefront())):(t.counter({name:"shop_pay_cannot_replace_browser_history",value:1}),t.log("shop_pay_cannot_replace_browser_history","[Shop Pay] Unable to replace Shop Pay in browser history",{replacementUrl:o,storefrontUrl:a.storefront()})))},[e,t,a])}};export{e as t};