"use strict";const e=require("@tempots/dom"),u=require("@tempots/ui"),p={mark:e.makeProviderMark("Theme"),create:({defaultAppearance:r="system",appearancePreferenceKey:s="bui-appearance"}={})=>{const t=u.useAppearance(),a=e.localStorageProp({key:s,defaultValue:r}),o=()=>{t.dispose(),a.dispose()};return{value:{appearance:e.computedOf(t,a)((c,n)=>n==="system"?c:n),appearancePreference:a,setAppearancePreference:c=>{a.set(c)}},dispose:o}}},m=()=>e.Use(p,({appearance:r})=>e.attr.class(r.map(s=>`b-${s}`)));exports.Theme=p;exports.ThemeAppearance=m;
