2024-03-12 09:29:31 -07:00
|
|
|
// Copyright 2024 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { createSelector } from 'reselect';
|
2025-09-16 17:39:03 -07:00
|
|
|
import type { StateType } from '../reducer.js';
|
|
|
|
import type { AudioRecorderStateType } from '../ducks/audioRecorder.js';
|
2024-03-12 09:29:31 -07:00
|
|
|
|
|
|
|
export function getAudioRecorder(state: StateType): AudioRecorderStateType {
|
|
|
|
return state.audioRecorder;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getErrorDialogAudioRecorderType = createSelector(
|
|
|
|
getAudioRecorder,
|
|
|
|
audioRecorder => {
|
|
|
|
return audioRecorder.errorDialogAudioRecorderType;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
export const getRecordingState = createSelector(
|
|
|
|
getAudioRecorder,
|
|
|
|
audioRecorder => {
|
|
|
|
return audioRecorder.recordingState;
|
|
|
|
}
|
|
|
|
);
|