diff --git a/src/lib/shared/hooks/interfaces/useIMatrixrouting.ts b/src/lib/shared/hooks/interfaces/useIMatrixrouting.ts deleted file mode 100644 index 0ee809d..0000000 --- a/src/lib/shared/hooks/interfaces/useIMatrixrouting.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { useGetDevice } from 'src/lib/store'; -import { MatrixRoutingState } from 'src/lib/types/state/state/MatrixRoutingState'; -import { useWebsocketContext } from 'src/lib/utils/useWebsocketContext'; -import { SignalType } from './useIRunDirectRouteAction'; - -/** - * Hook to allow routing and feedback of a matrix switcher that implements IMatrixRouting - * @param key key of matrix routing device - * @returns - */ -export function useIMatrixRouting(key: string): IMatrixRoutingReturn | undefined { - const { sendMessage } = useWebsocketContext(); - const device = useGetDevice(key); - - if (!device) return undefined; - - const setRoute = (route: RouteRequest) => { - sendMessage(`/device/${key}/route`, route); - }; - - return { matrixRoutingState: device, setRoute }; -} - -export interface IMatrixRoutingReturn { - matrixRoutingState: MatrixRoutingState; - setRoute: (route: RouteRequest) => void; -} - -interface RouteRequest { - inputKey: string; - outputKey: string; - routeType: SignalType; -} \ No newline at end of file diff --git a/src/lib/types/interfaces/iKeyName.ts b/src/lib/types/interfaces/iKeyName.ts deleted file mode 100644 index ee318ed..0000000 --- a/src/lib/types/interfaces/iKeyName.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IKeyName { - key: string; - name: string; -}