import{Wo as e,Wt as t,fs as n}from"./app-server-manager-signals-Yn0WSnoY.js";async function r(e,r,i,{shouldApplyStatus:a=()=>!0}={}){let o=await n(`set-remote-control-enabled-for-host`,{enabled:i,hostId:r});return a()&&t(e,r,o),o}var i,a,o=0,s;async function c(t,n,{force:l=!1}={}){if(a=n,s?.enabled===n)return s.promise;if(!l&&i===n)return null;let u=++o,d=r(t,e,n,{shouldApplyStatus:()=>u===o});s={enabled:n,promise:d};try{let e=await d;return u===o?(i=n,e):(a!=null&&a!==n&&await c(t,a,{force:!0}),e)}catch(e){throw u===o&&i===n&&(i=void 0),e}finally{s?.promise===d&&(s=void 0)}}export{r as n,c as t};
//# sourceMappingURL=local-remote-control-enabled-sync-Eqcy3rJl.js.map