import{X as e,bt as t,vt as n}from"./BT3KAag_.js";import{r}from"./DqZmeWn2.js";import"./wcGRWqFZ.js";import{b as i}from"./D7L6XPS4.js";function a(){let a=t(null),o=t(null),s=t(null),c=t(null),l=t(null),u=t(`entity`),d=t(null),f=t(null),p=t(null),m=t(`team`),h=t(`studiograph`),g=t(!1),_=t(!1);function v(t,n){e(a)&&(e(a)!==t||e(s)!==n)&&i(e(a)).catch(()=>{})}function y(e,t,r,i){v(e,r),n(a,e,!0),n(o,t,!0),n(s,r,!0),n(c,i??null,!0),n(l,null)}function b(t,r=``){e(a)&&e(a)!==t&&i(e(a)).catch(()=>{}),n(a,t,!0),n(o,null),n(s,null),n(c,null),n(l,r,!0)}function x(){n(u,`entity`)}function S(){n(u,`graph`)}function C(e){n(u,`view`),n(d,e,!0)}function w(e,t,r){n(p,e??`profile`,!0),t&&n(m,t,!0),r&&n(h,r,!0)}function T(){n(p,null),typeof window<`u`&&window.location.pathname.startsWith(`/settings`)&&r(`/`)}function E(t,r,i){e(s)===i&&e(a)===t?(n(a,null),n(o,null),n(s,null)):(n(a,t,!0),n(o,r,!0),n(s,i,!0)),n(c,null),n(l,null)}function D(){e(a)&&i(e(a)).catch(()=>{}),n(a,null),n(o,null),n(s,null),n(c,null),n(l,null)}return{get selectedRepo(){return e(a)},get selectedType(){return e(o)},get selectedId(){return e(s)},get selectedSubPath(){return e(c)},get selectedFolderPath(){return e(l)},get activeView(){return e(u)},get entityPath(){return e(a)&&e(o)&&e(s)?`/${e(a)}/${e(o)}/${e(s)}`:null},get hoveredEntityId(){return e(f)},set hoveredEntityId(e){n(f,e,!0)},get settingsPanel(){return e(p)},set settingsPanel(e){n(p,e,!0)},get workspaceTab(){return e(m)},set workspaceTab(e){n(m,e,!0)},get integrationsTab(){return e(h)},set integrationsTab(e){n(h,e,!0)},get hideSidebar(){return e(g)},set hideSidebar(e){n(g,e,!0)},get mobileSidebarOpen(){return e(_)},set mobileSidebarOpen(e){n(_,e,!0)},select:y,selectRepo:b,deselect:D,selectOnGraph:E,showEntity:x,showGraph:S,get activeViewId(){return e(d)},showView:C,showSettings:w,closeSettings:T}}var o=a();export{o as t};