export type WorkspaceTab = {
  key: string;
  title: string;
  route: string;
};

export function openTab(existing: WorkspaceTab[], next: WorkspaceTab): WorkspaceTab[] {
  if (existing.some((tab) => tab.key === next.key)) return existing;
  return [...existing, next];
}
