import{el as e,ov as n}from"./shared-0-C4kdVF7Y.js";var t="appearance:backgroundAnimation",r=`LSS-${t}`,o="(prefers-reduced-motion: reduce)";function a(){const[r,a]=e(t,"system"),i=n(o);return{animationMode:r,setAnimationMode:a,shouldAnimate:"enabled"===r||"disabled"!==r&&!i}}function i(){if("undefined"==typeof window)return!0;const e=function(){try{const e=localStorage.getItem(r);if(!e)return"system";const n=JSON.parse(e);if(n&&"object"==typeof n&&"value"in n&&"string"==typeof n.value)return n.value}catch{}return"system"}();return"enabled"===e||"disabled"!==e&&!window.matchMedia(o).matches}function s(e){if("undefined"==typeof window)return()=>{};const n=window.matchMedia(o),t=()=>{e(i())},a=e=>{e.key===r&&t()};return n.addEventListener("change",t),window.addEventListener("storage",a),()=>{n.removeEventListener("change",t),window.removeEventListener("storage",a)}}export{s as n,a as r,i as t};