refactor(thread-page-design-warning): migrate to the new DI architecture

Bug: twpowertools:176
Change-Id: I0f349e4dfe6fb4c13ff4b087f82529b1bdf66728
diff --git a/src/features/threadPageDesignWarning/presentation/nodeWatcherHandlers/inject.handler.ts b/src/features/threadPageDesignWarning/presentation/nodeWatcherHandlers/inject.handler.ts
new file mode 100644
index 0000000..1a016fc
--- /dev/null
+++ b/src/features/threadPageDesignWarning/presentation/nodeWatcherHandlers/inject.handler.ts
@@ -0,0 +1,16 @@
+import CssSelectorNodeWatcherHandler from '../../../../infrastructure/presentation/nodeWatcher/handlers/CssSelectorHandler.adapter';
+import { NodeMutation } from '../../../../presentation/nodeWatcher/NodeWatcherHandler';
+import ThreadPageDesignWarning from '../../core/threadPageDesignWarning';
+
+/** Inject old thread page design warning if applicable */
+export default class ThreadPageDesignWarningInjectHandler extends CssSelectorNodeWatcherHandler {
+  cssSelector = 'ec-thread > .page > .material-content > div[role="list"]';
+
+  constructor(private threadPageDesignWarning: ThreadPageDesignWarning) {
+    super();
+  }
+
+  onMutatedNode({ node }: NodeMutation) {
+    this.threadPageDesignWarning.injectWarningIfApplicable(node);
+  }
+}
diff --git a/src/features/threadPageDesignWarning/presentation/scripts/setUp.script.ts b/src/features/threadPageDesignWarning/presentation/scripts/setUp.script.ts
new file mode 100644
index 0000000..5dc600e
--- /dev/null
+++ b/src/features/threadPageDesignWarning/presentation/scripts/setUp.script.ts
@@ -0,0 +1,17 @@
+import Script from '../../../../common/architecture/scripts/Script';
+import ThreadPageDesignWarning from '../../core/threadPageDesignWarning';
+
+export default class ThreadPageDesignWarningSetUpScript extends Script {
+  priority = 102;
+  page: never;
+  environment: never;
+  runPhase: never;
+
+  constructor(private threadPageDesignWarning: ThreadPageDesignWarning) {
+    super();
+  }
+
+  execute() {
+    this.threadPageDesignWarning.setUp();
+  }
+}