export default function useOrganizationSwitcher() {
  const selectedOrg = useState<any | null>('selected-org', () => null)
  const selectedApp = useState<string>('selected-app', () => '')

  function setOrganization({ org, app }: { org: any; app: string }) {
    selectedOrg.value = org
    selectedApp.value = app || org?.nature || ''
  }

  return { selectedOrg, selectedApp, setOrganization }
}
