import{d as e}from"./hooks-settings-model-B-xhl-k2.js";var t=`hooks-settings`,n=`/settings`;function r({hostId:e,pluginId:n,projectRoot:r,source:i}){let a=new URLSearchParams;e!=null&&a.set(`hostId`,e),i!=null&&a.set(`source`,i),i!=null&&r!=null&&a.set(`projectRoot`,r),i===`plugin`&&n!==void 0&&a.set(`pluginId`,n??`__unknown__`);let o=a.toString();return o===``?t:`${t}?${o}`}function i({hostId:e,pluginId:t,projectRoot:i,source:a}){return`${n}/${r({hostId:e,pluginId:t,projectRoot:i,source:a})}`}function a({hooks:e,hostId:t,projectRoot:n}){let i=s(e,n);return r({hostId:t,pluginId:i===`plugin`?c(e):void 0,projectRoot:n,source:i})}function o(e,t,n){if(e.delete(`hostId`),e.delete(`pluginId`),e.delete(`projectRoot`),e.delete(`source`),n!=null){if(e.set(`hostId`,t),e.set(`source`,n.source),n.source===`project`){e.set(`projectRoot`,n.projectRoot);return}n.source===`plugin`&&n.pluginId!==void 0&&e.set(`pluginId`,n.pluginId??`__unknown__`)}}function s(t,n){let r=e(t.map(e=>e.source));return r===`project`&&n==null?null:r}function c(e){let t=new Set(e.map(e=>e.pluginId));if(t.size===1)return t.values().next().value??null}export{o as i,a as n,r,i as t};
//# sourceMappingURL=hooks-settings-route-BzjnQojK.js.map