/**
 * 通知渠道数据源
 */
import type { DataSourceConfig } from '../types';

export const notificationChannelTypesConfig: DataSourceConfig = {
  url: '/api/v1/notification-channel/types',
  transform: (data: any[]) => {
    return data.map((item: any) => ({
      label: `${item.label}`,
      value: item.code
    }));
  }
};

export const notificationChannelsConfig: DataSourceConfig = {
  url: '/api/v1/notification-channel/list',
  transform: (data: any[]) => {
    return data.map((item: any) => ({
      label: `(${item.channelType})-${item.name}`,
      value: item.id
    }));
  }
};

