export const channelRegistry = Object.freeze([
  {
    id: 'etsy', label: 'Etsy', state: 'available',
    capabilities: ['oauth', 'listing-import', 'order-import', 'approval-gated-draft'],
  },
  {
    id: 'ebay', label: 'eBay', state: 'adapter-planned',
    capabilities: ['catalogue-fields', 'manual-url-linking'],
  },
  {
    id: 'shire3d', label: 'shire3d.com', state: 'adapter-planned',
    capabilities: ['shared-catalogue'],
  },
]);

export function channelStatus(config, hasEtsyToken) {
  return channelRegistry.map(channel => ({
    ...channel,
    configured: channel.id === 'etsy'
      ? Boolean(config.etsyApiKey && config.etsySharedSecret && hasEtsyToken)
      : false,
  }));
}
