import{a as o}from"./p-401e165e.js";var a;const i=(null===(a=window.scData)||void 0===a?void 0:a.locale)||navigator.language||(null===navigator||void 0===navigator?void 0:navigator.browserLanguage)||(navigator.languages||["en"])[0],t=async()=>{var a,l,n,t;const s=o("https://api.surecart.com/v1/public/atlas",{locale:i}),e=await fetch(s),r=await e.json(),v=null===(a=(null==r?void 0:r.data)||[])||void 0===a?void 0:a.map((({code:a,name:o})=>({value:a,label:o})));return(null===(t=null===(n=null===(l=null===window||void 0===window?void 0:window.wp)||void 0===l?void 0:l.hooks)||void 0===n?void 0:n.applyFilters)||void 0===t?void 0:t.call(n,"surecart_address_countries",v))||v},n=async a=>{const l=o(`https://api.surecart.com/v1/public/atlas/${a}`,{locale:i}),n=await fetch(l);return await n.json()};export{t as c,n as g};