import{b as n,r as i}from"./tailwind-RH92XWLt.js";const r="extensionUpdateAvailable";async function l(){await n.storage.local.remove(r)}async function c(){const e=(await n.storage.local.get(r))[r];return e!=null&&e.version?n.runtime.getManifest().version===e.version?(await l(),null):e:null}function d(){n.runtime.reload()}function f(a){const e=(o,t)=>{var s;if(t==="local"&&r in o){const u=(s=o[r])==null?void 0:s.newValue;a(u??null)}};return n.storage.onChanged.addListener(e),()=>n.storage.onChanged.removeListener(e)}function v(){const[a,e]=i.useState(null);return i.useEffect(()=>(c().then(e),f(t=>{if(t&&n.runtime.getManifest().version===t.version){e(null);return}e(t)})),[]),a}export{d as a,v as u};
