import { queryOptions } from '@tanstack/react-query';
import { listEmailConfigurations } from './service';

export const emailConfigurationKeys = {
  all: ['email-configurations'] as const,
  lists: () => [...emailConfigurationKeys.all, 'list'] as const,
  list: () => [...emailConfigurationKeys.lists()] as const,
};

export const emailConfigurationsQueryOptions = () =>
  queryOptions({
    queryKey: emailConfigurationKeys.list(),
    queryFn: () => listEmailConfigurations(),
  });
