The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { agentChatChannelsState } from '@/ai/states/agentChatChannelsState';
import { createAtomSelector } from '@/ui/utilities/state/jotai/utils/createAtomSelector';
import { type AgentChatChannel } from '@/ai/types/AgentChatChannel';
export const agentChatAccessibleChannelsSelector = createAtomSelector<
AgentChatChannel[]
>({
key: 'agentChatAccessibleChannelsSelector',
get: ({ get }) =>
(get(agentChatChannelsState) ?? []).filter(
({ isAccessible }) => isAccessible,
),
});