import"./rolldown-runtime-DIIn1E2Q.js";import{dt as e}from"./vendor-primevue-_eYbXsHY.js";import{D as t,c as n,kt as r,wt as i}from"./vendor-vue-core-DO0afONr.js";import{n as a,t as o}from"./types-DPJvCrdo.js";import{c as s,u as c}from"./vendor-vueuse-DUMtJaL2.js";import{r as l}from"./api-BebQfoGK.js";import{o as u}from"./i18n-dAUEhQVe.js";var d=n(`systemStats`,()=>{let fetchSystemStatsData=async()=>{try{return await l.getSystemStats()}catch(e){throw console.error(`Error fetching system stats:`,e),e}},{state:e,isLoading:t,error:n,isReady:r,execute:i}=s(fetchSystemStatsData,null,{immediate:!0});function getFormFactor(){if(o)return`cloud`;if(!e.value?.system?.os)return`other`;let t=e.value.system.os.toLowerCase();if(a){if(t.includes(`windows`))return`desktop-windows`;if(t.includes(`darwin`)||t.includes(`mac`))return`desktop-mac`}else{if(t.includes(`windows`))return`git-windows`;if(t.includes(`darwin`)||t.includes(`mac`))return`git-mac`;if(t.includes(`linux`))return`git-linux`}return`other`}return{systemStats:e,isLoading:t,error:n,isInitialized:r,refetchSystemStats:i,getFormFactor}});function useCopyToClipboard(){let{copy:t,copied:n}=c({legacy:!0}),r=e();async function copyToClipboard(e){try{await t(e),n.value?r.add({severity:`success`,summary:u(`g.success`),detail:u(`clipboard.successMessage`),life:3e3}):r.add({severity:`error`,summary:u(`g.error`),detail:u(`clipboard.errorMessage`)})}catch{r.add({severity:`error`,summary:u(`g.error`),detail:u(`clipboard.errorMessage`)})}}return{copyToClipboard}}var f=[],p=[`pysssss.Locking`,`pysssss.SnapToGrid`,`pysssss.FaviconStatus`,`KJNodes.browserstatus`],m=n(`extension`,()=>{let e=r({}),n=t(()=>Object.values(e.value)),a=r(new Set),o=t(()=>Array.from(a.value).filter(t=>!(t in e.value))),isExtensionInstalled=t=>t in e.value,isExtensionEnabled=e=>!a.value.has(e),s=t(()=>n.value.filter(e=>isExtensionEnabled(e.name)));function isExtensionReadOnly(e){return p.includes(e)||f.includes(e)}function registerExtension(t){if(!t.name)throw Error(`Extensions must have a 'name' property.`);if(e.value[t.name])throw Error(`Extension named '${t.name}' already registered.`);a.value.has(t.name)&&console.warn(`Extension ${t.name} is disabled.`),e.value[t.name]=i(t)}function loadDisabledExtensionNames(e){a.value=new Set(e);for(let e of p)a.value.add(e);for(let e of f)a.value.delete(e)}let c=r([]);function captureCoreExtensions(){c.value=n.value.map(e=>e.name)}function isCoreExtension(e){return c.value.includes(e)}return{extensions:n,enabledExtensions:s,inactiveDisabledExtensionNames:o,isExtensionInstalled,isExtensionEnabled,isExtensionReadOnly,registerExtension,loadDisabledExtensionNames,captureCoreExtensions,isCoreExtension,hasThirdPartyExtensions:t(()=>n.value.some(e=>!isCoreExtension(e.name)))}});export{useCopyToClipboard as n,d as r,m as t};
//# sourceMappingURL=extensionStore-P-YqST__.js.map