import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,dc as n,yc as r}from"./paths-Ci1iwL5Y.js";import{n as i,r as a,t as o}from"./language-BYeqMX74.js";async function s(e,r,a){let s=a.trim().toLowerCase();if(!s){let t=n().preferredLanguage??`auto`,r=i(),a=t===`auto`?` → ${o(r)}`:``;return e(`Language: ${o(t)}${a}`,{display:`system`}),null}if(!c.includes(s))return e(`Invalid language "${s}". Use: en, zh, or auto`,{display:`system`}),null;let l=s;t(e=>({...e,preferredLanguage:l}));let u=i(),d=l===`auto`?` → ${o(u)}`:``;return e(`Language set to ${o(l)}${d}`,{display:`system`}),null}var c;e((()=>{r(),a(),c=[`en`,`zh`,`auto`]}))();export{s as call};