import{n as e}from"./BNTlsKDJ.js";import{X as t,bt as n,vt as r}from"./BT3KAag_.js";import{T as i,h as a}from"./D7L6XPS4.js";var o=e({insightsStore:()=>c});function s(){let e=n(!1),o=n(!1),s=n(null),c=n(!1),l=n(!1);async function u(){if(!t(e)){r(e,!0);try{let e=await a();r(s,e.accent_color??null,!0),r(c,e.onboarded??!1,!0),r(o,!0),r(l,!0)}catch(e){console.error(`Failed to load preferences:`,e),r(o,!0),r(l,!0)}finally{r(e,!1)}}}async function d(e){r(s,e,!0),await i({accent_color:e})}async function f(){r(c,!0),await i({onboarded:!0})}return{get loading(){return t(e)},get loaded(){return t(o)},get accentColor(){return t(s)},get onboarded(){return t(c)},get prefsLoaded(){return t(l)},load:u,saveAccentColor:d,markOnboarded:f}}var c=s();export{o as n,c as t};