import{t as e}from"./userFacingCopy-BFx0qruN.js";function t(){chrome.runtime.sendMessage({type:`OPEN_SELLER_ARCHIVE_TAB`,payload:{tab:`collection`}})}var n=`xyxp-collect-saved-toast`;function r(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`)}function i(t=e.materialSaved){document.getElementById(n)?.remove();let i=document.createElement(`div`);i.id=n,i.setAttribute(`role`,`status`),i.setAttribute(`aria-live`,`polite`),i.style.cssText=[`position:fixed`,`left:50%`,`top:18%`,`transform:translateX(-50%)`,`z-index:2147483647`,`max-width:min(360px,calc(100vw - 32px))`,`padding:14px 20px`,`border-radius:12px`,`border:1px solid #e6c200`,`background:linear-gradient(180deg,#fffdf5,#fff9e6)`,`color:#422006`,`font-size:15px`,`font-weight:700`,`line-height:1.45`,`text-align:center`,`box-shadow:0 8px 28px rgba(80,60,0,.18)`,`pointer-events:none`,`font-family:system-ui,-apple-system,"PingFang SC",sans-serif`].join(`;`),i.innerHTML=`<span style="display:inline-flex;align-items:center;gap:8px;justify-content:center;">
  <span style="display:inline-flex;width:22px;height:22px;border-radius:50%;background:#ffda00;color:#422006;font-size:14px;line-height:22px;font-weight:800;">✓</span>
  <span>${r(t)}</span>
</span>`,document.documentElement.appendChild(i)}var a=1e3;function o(){return window.history.length>1}async function s(){try{await chrome.runtime.sendMessage({type:`CLOSE_CURRENT_TAB`})}catch{window.close()}}function c(){if(o()){history.back();return}s()}function l(e=a){setTimeout(()=>{c()},e)}function u(t=e.materialSaved,n=a){i(t),l(n)}export{i as n,t as r,u as t};