import{A as e,S as t,b as n,et as r,k as i,x as a}from"./app-shell-state-Dskh7Hih.js";import{n as o,t as s}from"./app-shell-tab-controller-cnh2C4j9.js";import{t as c}from"./focus-composer-D2R3KWg-.js";function l(e){return e===`bottom`?s:o}function u(a,o,{activateFallbackTab:s,allowEmpty:c}={}){let u=l(o),d=a.get(u.tabs$),f=null;if(o===`bottom`){let t=a.get(e);f=t===`bottom-panel`?null:t}return d.length===0&&c!==!0?!1:(s===!0&&a.get(u.activeTab$)==null&&u.activateTab(a,d[0]?.tabId??null),o===`bottom`?(f!=null&&a.set(i,f),n(a,!0),r(a,`bottom-panel`)):t(a,!0),!0)}function d(t,o){if(o===`bottom`){let a=t.get(e)===`bottom-panel`?t.get(i):null;n(t,!1),a!=null&&r(t,a),c();return}a(t,!1,{restoreFullWidthOnNextOpen:!0})}function f(e,t,n){let r=l(t);return e.get(r.tabById$,n)==null?!1:(r.activateTab(e,n),u(e,t))}function p(e,t,n,r){return r()?(l(t).activateTab(e,n),u(e,t)):!1}export{p as a,u as i,d as n,l as r,f as t};
//# sourceMappingURL=thread-panel-state-DeAm6qhS.js.map