import * as HOMEHUB_SETTINGS from '@bthlabs/homehub-app/lib/settings';
import {
  SERVICES as IFORMICARIUM_SERVICES,
  WIDGETS as IFORMICARIUM_WIDGETS
} from '@bthlabs/homehub-iformicarium';
import {
  SERVICES as TRADFRI_SERVICES,
  WIDGETS as TRADFRI_WIDGETS
} from '@bthlabs/homehub-tradfri';

import {FakeAPIService, FakeAPIWidget} from 'vendor/fake_api_service';
import {VendorTestService, VendorTestWidget} from 'vendor/vendor_test';

var APP_SETTINGS = {
  ...HOMEHUB_SETTINGS,
  WEBSOCKET: {
    ...HOMEHUB_SETTINGS.WEBSOCKET,
    url: 'ws://homehub.work/backend/websocket'
  },
  SERVICES: {
    ...HOMEHUB_SETTINGS.SERVICES,
    ...IFORMICARIUM_SERVICES,
    ...TRADFRI_SERVICES,
    [VendorTestService.kind]: VendorTestService,
    [FakeAPIService.kind]: FakeAPIService
  },
  WIDGETS: {
    ...HOMEHUB_SETTINGS.WIDGETS,
    ...IFORMICARIUM_WIDGETS,
    ...TRADFRI_WIDGETS,
    [VendorTestService.widget]: VendorTestWidget,
    [FakeAPIService.widget]: FakeAPIWidget
  },
  OFFLINE_MODE: false
};

export default APP_SETTINGS;
