import{aa as p,v as o,N as i,i as v,g as f}from"./Dk4AzF7j.js";const y=p("ScreenshotStore",()=>{const t=o({}),s=o(!0),{kapi:n}=i(),a=async(e,S=!1)=>{if(t.value[e]&&!S)return t.value[e];s.value=!0;try{const r=await n("Screenshot"),h=await r.getSystemScreenshots(Number(e)),m=await r.getScreenshot(Number(e));return t.value[e]={components:h?.screenshots||{},main:m?.screenshot||{}},t.value[e]}catch(r){console.error(r)}finally{s.value=!1}},c=()=>{t.value={},s.value=!1},u=v(),l=f(()=>{const{sid:e}=u.params;return e&&t.value?.[e]||null});return{getScreenshots:a,screenshots:t,polling:s,resetStore:c,selectProjectScreenshots:l}});export{y as u};
