From e1969585f99e35e86571e029bf11ebc8b26c3c7c Mon Sep 17 00:00:00 2001
From: Jamie V <jamie.j.vigliotta@nasa.gov>
Date: Fri, 20 Dec 2024 14:22:18 -0800
Subject: [PATCH] added getTypes to types api, modifying which tabs are shown,
 working on annoatation tab

---
 src/api/types/TypeRegistry.js                         | 11 +++++++++++
 .../styles/StylesInspectorViewProvider.js             |  9 +++++++++
 src/plugins/notebook/NotebookType.js                  |  1 +
 3 files changed, 21 insertions(+)

diff --git a/src/api/types/TypeRegistry.js b/src/api/types/TypeRegistry.js
index 9506992edb..1dac938fb4 100644
--- a/src/api/types/TypeRegistry.js
+++ b/src/api/types/TypeRegistry.js
@@ -89,6 +89,17 @@ export default class TypeRegistry {
   get(typeKey) {
     return this.types[typeKey] || UNKNOWN_TYPE;
   }
+  /**
+   * List all registered types.
+   * @returns {Type[]} all registered types
+   */
+  getTypes() {
+    return Object.values(this.types);
+  }
+  /**
+   * Import legacy types.
+   * @param {TypeDefinition[]} types the types to import
+   */
   importLegacyTypes(types) {
     types
       .filter((t) => this.get(t.key) === UNKNOWN_TYPE)
diff --git a/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js b/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js
index 52d79afdd4..8abc1acdc1 100644
--- a/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js
+++ b/src/plugins/inspectorViews/styles/StylesInspectorViewProvider.js
@@ -91,6 +91,15 @@ export default function StylesInspectorViewProvider(openmct) {
           );
           _destroy = destroy;
         },
+        showTab: function () {
+          const objectSelection = selection?.[0];
+          const objectContext = objectSelection?.[0]?.context;
+          const layoutItem = objectContext?.layoutItem;
+          const domainObject = objectContext?.item;
+          const hasStyles = domainObject?.configuration?.objectStyles;
+
+          return layoutItem || hasStyles;
+        },
         priority: function () {
           return openmct.priority.DEFAULT;
         },
diff --git a/src/plugins/notebook/NotebookType.js b/src/plugins/notebook/NotebookType.js
index 375c22af8a..ef299fb69c 100644
--- a/src/plugins/notebook/NotebookType.js
+++ b/src/plugins/notebook/NotebookType.js
@@ -28,6 +28,7 @@ export default class NotebookType {
     this.description = description;
     this.cssClass = icon;
     this.creatable = true;
+    this.annotatable = true;
     this.form = [
       {
         key: 'defaultSort',