import { K8sResourceKind, K8sKind, apiVersionForModel } from '@console/internal/module/k8s';
import {
  DeployImageFormData,
  Resources,
} from '@console/dev-console/src/components/import/import-types';
import {
  EventSourceFormData,
  SinkType,
  AddChannelFormData,
  NormalizedEventSources,
} from '../../components/add/import-types';
import { ClusterServiceVersionKind, InstallModeType } from '@console/operator-lifecycle-manager';
import { RevisionModel, ServiceModel, KafkaModel } from '../../models';
import { healthChecksProbeInitialData } from '@console/dev-console/src/components/health-checks/health-checks-probe-utils';
import { getChannelKind, getChannelData } from '../create-channel-utils';

export const defaultData: DeployImageFormData = {
  project: {
    name: '',
    displayName: '',
    description: '',
  },
  application: {
    initial: '',
    name: '',
    selectedKey: '',
  },
  name: '',
  searchTerm: '',
  registry: 'external',
  allowInsecureRegistry: false,
  imageStream: {
    image: '',
    tag: '',
    namespace: '',
  },
  isi: {
    name: '',
    image: {},
    tag: '',
    status: { metadata: {}, status: '' },
    ports: [],
  },
  image: {
    name: '',
    image: {},
    tag: '',
    status: { metadata: {}, status: '' },
    ports: [],
  },
  runtimeIcon: null,
  isSearchingForImage: false,
  resources: Resources.OpenShift,
  serverless: {
    scaling: {
      minpods: 1,
      maxpods: 5,
      concurrencytarget: 1,
      concurrencylimit: 1,
    },
  },
  route: {
    create: true,
    targetPort: '',
    unknownTargetPort: '',
    defaultUnknownPort: 8080,
    path: '',
    hostname: '',
    secure: false,
    tls: {
      termination: '',
      insecureEdgeTerminationPolicy: '',
      caCertificate: '',
      certificate: '',
      destinationCACertificate: '',
      privateKey: '',
    },
  },
  build: {
    env: [],
    triggers: {
      webhook: true,
      image: true,
      config: true,
    },
    strategy: 'Source',
  },
  deployment: {
    env: [],
    triggers: {
      image: true,
      config: true,
    },
    replicas: 1,
  },
  labels: {},
  env: {},
  limits: {
    cpu: {
      request: '',
      requestUnit: 'm',
      defaultRequestUnit: 'm',
      limit: '',
      limitUnit: 'm',
      defaultLimitUnit: 'm',
    },
    memory: {
      request: '',
      requestUnit: 'Mi',
      defaultRequestUnit: 'Mi',
      limit: '',
      limitUnit: 'Mi',
      defaultLimitUnit: 'Mi',
    },
  },
  healthChecks: healthChecksProbeInitialData,
};

export const deploymentData: K8sResourceKind = {
  kind: 'Deployment',
  apiVersion: 'apps/v1',
  metadata: {
    annotations: { 'deployment.kubernetes.io/revision': '1' },
    selfLink: '/apis/apps/v1/namespaces/testproject3/deployments/overlayimage',
    resourceVersion: '471849',
    name: 'overlayimage',
    uid: '64b34874-debd-11e9-8cdf-0a0700ae5e38',
    creationTimestamp: '2019-09-24T11:21:03Z',
    generation: 4,
    namespace: 'testproject3',
    labels: { 'app.kubernetes.io/part-of': 'application-3' },
  },
  spec: {
    replicas: 6,
    selector: { matchLabels: { app: 'hello-openshift' } },
    template: {
      metadata: { creationTimestamp: null, labels: { app: 'hello-openshift' } },
      spec: {
        containers: [
          {
            name: 'hello-openshift',
            image: 'openshift/hello-openshift',
            ports: [{ containerPort: 8080, protocol: 'TCP' }],
            resources: {},
            terminationMessagePath: '/dev/termination-log',
            terminationMessagePolicy: 'File',
            imagePullPolicy: 'Always',
          },
        ],
        restartPolicy: 'Always',
        terminationGracePeriodSeconds: 30,
        dnsPolicy: 'ClusterFirst',
        securityContext: {},
        schedulerName: 'default-scheduler',
      },
    },
    strategy: {
      type: 'RollingUpdate',
      rollingUpdate: { maxUnavailable: '25%', maxSurge: '25%' },
    },
    revisionHistoryLimit: 10,
    progressDeadlineSeconds: 600,
  },
  status: {
    observedGeneration: 4,
    replicas: 6,
    updatedReplicas: 6,
    readyReplicas: 6,
    availableReplicas: 6,
    conditions: [
      {
        type: 'Progressing',
        status: 'True',
        lastUpdateTime: '2019-09-24T11:21:14Z',
        lastTransitionTime: '2019-09-24T11:21:03Z',
        reason: 'NewReplicaSetAvailable',
        message: 'ReplicaSet "overlayimage-54b47fbb75" has successfully progressed.',
      },
      {
        type: 'Available',
        status: 'True',
        lastUpdateTime: '2019-09-24T11:24:57Z',
        lastTransitionTime: '2019-09-24T11:24:57Z',
        reason: 'MinimumReplicasAvailable',
        message: 'Deployment has minimum availability.',
      },
    ],
  },
};

export const deploymentKnativeData: K8sResourceKind = {
  kind: 'Deployment',
  apiVersion: 'apps/v1',
  metadata: {
    annotations: { 'deployment.kubernetes.io/revision': '1' },
    selfLink: '/apis/apps/v1/namespaces/testproject3/deployments/overlayimage',
    resourceVersion: '471849',
    name: 'overlayimage',
    uid: '64b34874-debd-11e9-8cdf-0a0700ae5e38',
    creationTimestamp: '2019-09-24T11:21:03Z',
    generation: 4,
    namespace: 'testproject3',
    labels: {
      'app.kubernetes.io/part-of': 'application-3',
      'serving.knative.dev/service': 'overlayimage',
    },
    ownerReferences: [
      {
        apiVersion: `${RevisionModel.apiGroup}/${RevisionModel.apiVersion}`,
        kind: RevisionModel.kind,
        name: 'overlayimage-fdqsf',
        uid: '02c34a0e-9638-11e9-b134-06a61d886b62',
        controller: true,
        blockOwnerDeletion: true,
      },
    ],
  },
  spec: {
    replicas: 6,
    selector: { matchLabels: { app: 'hello-openshift' } },
    template: {
      metadata: { creationTimestamp: null, labels: { app: 'hello-openshift' } },
      spec: {
        containers: [
          {
            name: 'hello-openshift',
            image: 'openshift/hello-openshift',
            ports: [{ containerPort: 8080, protocol: 'TCP' }],
            resources: {},
            terminationMessagePath: '/dev/termination-log',
            terminationMessagePolicy: 'File',
            imagePullPolicy: 'Always',
          },
        ],
        restartPolicy: 'Always',
        terminationGracePeriodSeconds: 30,
        dnsPolicy: 'ClusterFirst',
        securityContext: {},
        schedulerName: 'default-scheduler',
      },
    },
    strategy: {
      type: 'RollingUpdate',
      rollingUpdate: { maxUnavailable: '25%', maxSurge: '25%' },
    },
    revisionHistoryLimit: 10,
    progressDeadlineSeconds: 600,
  },
  status: {
    observedGeneration: 4,
    replicas: 6,
    updatedReplicas: 6,
    readyReplicas: 6,
    availableReplicas: 6,
    conditions: [
      {
        type: 'Progressing',
        status: 'True',
        lastUpdateTime: '2019-09-24T11:21:14Z',
        lastTransitionTime: '2019-09-24T11:21:03Z',
        reason: 'NewReplicaSetAvailable',
        message: 'ReplicaSet "overlayimage-54b47fbb75" has successfully progressed.',
      },
      {
        type: 'Available',
        status: 'True',
        lastUpdateTime: '2019-09-24T11:24:57Z',
        lastTransitionTime: '2019-09-24T11:24:57Z',
        reason: 'MinimumReplicasAvailable',
        message: 'Deployment has minimum availability.',
      },
    ],
  },
};

const eventSourceData = {
  cronjobsource: {
    data: '',
    schedule: '* * * * *',
  },
  pingsource: {
    data: '',
    schedule: '* * * * *',
  },
  apiserversource: {
    mode: '',
    serviceAccountName: '',
    resources: [
      {
        apiVersion: 'v1',
        kind: 'Event',
      },
    ],
  },
  kafkasource: {
    bootstrapServers: ['my-cluster-kafka-bootstrap.kafka:9092'],
    topics: ['knative-demo-topic'],
    consumerGroup: 'knative-group',
    net: {
      sasl: {
        enable: false,
        user: { secretKeyRef: { name: '', key: '' } },
        password: { secretKeyRef: { name: '', key: '' } },
      },
      tls: {
        enable: false,
        caCert: { secretKeyRef: { name: '', key: '' } },
        cert: { secretKeyRef: { name: '', key: '' } },
        key: { secretKeyRef: { name: '', key: '' } },
      },
    },
    serviceAccountName: '',
  },
  containersource: {
    template: {
      spec: {
        containers: [
          {
            image: 'test-knative-image',
            name: '',
            args: [''],
            env: [],
          },
        ],
      },
    },
  },
};

export const getDefaultEventingData = (typeEventSource: string): EventSourceFormData => {
  const defaultEventingData: EventSourceFormData = {
    project: {
      name: 'mock-project',
      displayName: '',
      description: '',
    },
    apiVersion: 'sources.knative.dev/v1alpha1',
    application: {
      initial: 'mock-app',
      name: 'mock-app',
      selectedKey: 'mock-app',
    },
    name: 'esmyapp',
    sinkType: SinkType.Resource,
    sink: {
      apiVersion: `${ServiceModel.apiGroup}/${ServiceModel.apiVersion}`,
      name: 'event-display',
      kind: ServiceModel.kind,
      key: `${ServiceModel.kind}-event-display`,
    },
    type: typeEventSource,
    data: {
      [typeEventSource.toLowerCase()]: eventSourceData[typeEventSource.toLowerCase()],
    },
    yamlData: '',
  };
  return defaultEventingData;
};

export const getEventSourceDeploymentData = (EventSourceModel: K8sKind): K8sResourceKind => {
  return {
    kind: 'Deployment',
    apiVersion: 'apps/v1',
    metadata: {
      name: 'overlayimage',
      uid: '64b34874-debd-11e9-8cdf-0a0700ae5e38',
      namespace: 'testproject3',
      ownerReferences: [
        {
          apiVersion: `${EventSourceModel.apiGroup}/${EventSourceModel.apiVersion}`,
          kind: EventSourceModel.kind,
          name: 'overlayimage-fdqsffg',
          uid: '1317f615-9636-11e9-b134-06a61d886b689_1',
          controller: true,
          blockOwnerDeletion: true,
        },
      ],
    },
    spec: {
      replicas: 1,
      template: {
        metadata: { creationTimestamp: null, labels: { app: 'hello-openshift' } },
        spec: {
          containers: [
            {
              name: 'hello-openshift',
              image: 'openshift/hello-openshift',
              ports: [{ containerPort: 8080, protocol: 'TCP' }],
              resources: {},
              terminationMessagePath: '/dev/termination-log',
              terminationMessagePolicy: 'File',
              imagePullPolicy: 'Always',
            },
          ],
          restartPolicy: 'Always',
          terminationGracePeriodSeconds: 30,
          dnsPolicy: 'ClusterFirst',
          securityContext: {},
          schedulerName: 'default-scheduler',
        },
      },
      strategy: {
        type: 'RollingUpdate',
        rollingUpdate: { maxUnavailable: '25%', maxSurge: '25%' },
      },
      revisionHistoryLimit: 10,
      progressDeadlineSeconds: 600,
    },
  };
};

export const Kafkas: K8sResourceKind[] = [
  {
    apiVersion: apiVersionForModel(KafkaModel),
    kind: KafkaModel.kind,
    metadata: {
      creationTimestamp: '2020-07-06T16:43:44Z',
      generation: 1,
      name: 'my-cluster',
      namespace: 'div',
      resourceVersion: '142204',
      selfLink: '/apis/kafka.strimzi.io/v1beta1/namespaces/div/kafkas/my-cluster',
      uid: '56c871cf-e649-4c7e-8ac6-8fafc933c96f',
    },
    spec: {
      kafka: {
        config: {
          'log.message.format.version': '2.5',
          'offsets.topic.replication.factor': 3,
          'transaction.state.log.min.isr': 2,
          'transaction.state.log.replication.factor': 3,
        },
        listeners: {
          plain: {},
          tls: {},
        },
        replicas: 3,
        storage: {
          type: 'ephemeral',
        },
        version: '2.5.0',
      },
      zookeeper: {
        replicas: 3,
        storage: {
          type: 'ephemeral',
        },
      },
    },
    status: {
      conditions: [
        {
          lastTransitionTime: '2020-07-06T16:45:13+0000',
          status: 'True',
          type: 'Ready',
        },
      ],
      listeners: [
        {
          addresses: [
            {
              host: 'my-cluster-kafka-bootstrap.div.svc',
              port: 9092,
            },
          ],
          bootstrapServers: 'my-cluster-kafka-bootstrap.div.svc:9092',
          type: 'plain',
        },
        {
          addresses: [
            {
              host: 'my-cluster-kafka-bootstrap.div.svc',
              port: 9093,
            },
          ],
          bootstrapServers: 'my-cluster-kafka-bootstrap.div.svc:9093',
          certificates: [
            '-----BEGIN CERTIFICATE-----\nMIIDLTCCAhWgAwIBAgIJAKdAmIkaXSmiMA0GCSqGSIb3DQEBCwUAMC0xEzARBgNV\nBAoMCmlvLnN0cmltemkxFjAUBgNVBAMMDWNsdXN0ZXItY2EgdjAwHhcNMjAwNzA2\nMTY0MzQ0WhcNMjEwNzA2MTY0MzQ0WjAtMRMwEQYDVQQKDAppby5zdHJpbXppMRYw\nFAYDVQQDDA1jbHVzdGVyLWNhIHYwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAp0yDYlEHNPChuaNVBqZMTpYGfNe+FvHoyp3oB6bsErsl5SjCTTs5rkfK\nMT/vfEI7vmuaAvtSktJKKrZrDY/L4tJkf7IaJGAf5Jfgr2UEAmfzZHR2JTx+kODF\n1Q5PI3pH/ENjof6i686UE9VCovCifLiWuZaLaaYFoadVKnDJMPUyQvSr6zBbwCKO\n4jUM2MRMKabAhvlUricmTXX/1y4+26UIzmad2jG2bLZr+vrHDtc+HfkuJXl/4lD/\nm9TMN/Ab08aNFvF9dorg9hgxoL/tE4J8TRJp9wB5oF0BfU0B9JZ5ML+nvWMTF8no\nEYlejBHvmnUaBEecEZ0C3GKm4CFABwIDAQABo1AwTjAdBgNVHQ4EFgQUGign3S8T\n+p2ABHBE+ASURZZ0GsQwHwYDVR0jBBgwFoAUGign3S8T+p2ABHBE+ASURZZ0GsQw\nDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAJpkcJO5y9h5zRGkQ1+Pr\n8Y9+qPZnQeFCYIFmtT7eX+1/64anDnK8i3ZPy2GyQvxFazGPLRzaUpFr/fRDcw05\ntNRAIhet6cKQYgZBGJo4QPCE6XTZrPI9tf7xG/otJczQtsDNxkxfxJ3AGVdKkbw7\nst1gAFJncoDWyie5I9LiR8rr7OjAgbECKRePbjxbYmb3rIkaecARPiOiOOfEdwB+\nWOPSSTc5L1Wtf00pQ1jtnpnFgh9s5xHoATWjm0kr2uKSEd7Jwikf1HNLEjNlOdpD\njSavbHxKaQXxbs2e+z5RNqsGi6LgZs6tEni3j9zadX2KoXgrlxn9ZrK90e8E1Pdg\ndw==\n-----END CERTIFICATE-----\n',
          ],
          type: 'tls',
        },
      ],
      observedGeneration: 1,
    },
  },
  {
    apiVersion: apiVersionForModel(KafkaModel),
    kind: KafkaModel.kind,
    metadata: {
      creationTimestamp: '2020-07-06T16:56:39Z',
      generation: 1,
      name: 'my-cluster2',
      namespace: 'div',
      resourceVersion: '152566',
      selfLink: '/apis/kafka.strimzi.io/v1beta1/namespaces/div/kafkas/my-cluster2',
      uid: '219842be-00df-4e30-9c15-fce4b7438244',
    },
    spec: {
      kafka: {
        config: {
          'log.message.format.version': '2.5',
          'offsets.topic.replication.factor': 3,
          'transaction.state.log.min.isr': 2,
          'transaction.state.log.replication.factor': 3,
        },
        listeners: {
          plain: {},
          tls: {},
        },
        replicas: 3,
        storage: {
          type: 'ephemeral',
        },
        version: '2.5.0',
      },
      zookeeper: {
        replicas: 3,
        storage: {
          type: 'ephemeral',
        },
      },
    },
    status: {
      conditions: [
        {
          lastTransitionTime: '2020-07-06T16:57:34+0000',
          status: 'True',
          type: 'Ready',
        },
      ],
      listeners: [
        {
          addresses: [
            {
              host: 'my-cluster2-kafka-bootstrap.div.svc',
              port: 9092,
            },
          ],
          bootstrapServers: 'my-cluster2-kafka-bootstrap.div.svc:9092',
          type: 'plain',
        },
        {
          addresses: [
            {
              host: 'my-cluster2-kafka-bootstrap.div.svc',
              port: 9093,
            },
          ],
          bootstrapServers: 'my-cluster2-kafka-bootstrap.div.svc:9093',
          certificates: [
            '-----BEGIN CERTIFICATE-----\nMIIDLTCCAhWgAwIBAgIJAM5D3NjoJTpcMA0GCSqGSIb3DQEBCwUAMC0xEzARBgNV\nBAoMCmlvLnN0cmltemkxFjAUBgNVBAMMDWNsdXN0ZXItY2EgdjAwHhcNMjAwNzA2\nMTY1NjQwWhcNMjEwNzA2MTY1NjQwWjAtMRMwEQYDVQQKDAppby5zdHJpbXppMRYw\nFAYDVQQDDA1jbHVzdGVyLWNhIHYwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEA4VPNI9879XEQ6ZNRVLOtP9FeUfkbdvxfSYqat1mT/BIV+gO/UlYbVpuq\nr19D3hBLja2q0skJAP0id0alX48f2UErXHumLZwz+4rpuZWToKqaTPp/0RTFv0d8\nDdDGweyysIyj5+MY2sRDQISXVg/3sUe5IIuJTWlAibgStcKq8wQYsbijLRx+2/GP\nUIALGJBU6vazyMo7do90AJoZ1YzG/n7mX3UYqpVy8qbJ47HkfQO8I/swS6+gEgp0\nyE+zKo41eUpX/ZMXLFIpry+I8xwBaTN7/Oc1kmTvODSvEKjmjtK0B9jhAwbrZk9u\nyLEqw9VTz1c1/70qpRg399RF8mFV4wIDAQABo1AwTjAdBgNVHQ4EFgQUUVDhyMRG\nbkUeL9+XddzQwUq5cr4wHwYDVR0jBBgwFoAUUVDhyMRGbkUeL9+XddzQwUq5cr4w\nDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAh7lwMOXzocBKx9HfdHou\neyL26gsF/bUpn01X0kmkEMpdj0a+FfeEXlPiH8AUQlbPjAaOIICHj8IeSM4T8/4c\n/qT0q4BZU81A4X05jHUijEEPQ5fRvmjdY2qkDUT5hOeHOQRfVXgwnBzNDykzNq4K\n6MIEwyz7PhvKUgsJ/f6j/KpHyxN2dJLTx+PaxWorRY5eiajnqZ+4WmnVPcPID8ax\nd3lChMhC3eGZiBv8/OtXZKeBF4ChTOdbfYS3jx8fElc0GkbLk56SyHMVtjRkGsON\n34tNqjz8rHQ0AGineJ72YtGR5DJzWvll09cVtXFBTL+6LYVCQYqSB9/gzXyAtUjb\nHw==\n-----END CERTIFICATE-----\n',
          ],
          type: 'tls',
        },
      ],
      observedGeneration: 1,
    },
  },
];

export const eventSourcesObj: NormalizedEventSources = {
  CamelSource: {
    name: 'CamelSource',
    iconUrl: 'static/assets/camelsource.svg',
    displayName: 'Camel Source',
    title: 'Camel Source',
  },
  PingSource: {
    name: 'PingSource',
    iconUrl: 'static/assets/pingsource.png',
    displayName: 'Ping Source',
    title: 'Ping Source',
  },
  ApiServerSource: {
    name: 'ApiServerSource',
    iconUrl: 'static/assets/apiserversource.png',
    displayName: 'Api Server Source',
    title: 'Api Server Source',
  },
  GitHubSource: {
    name: 'GitHubSource',
    iconUrl: 'static/assets/github.png',
    displayName: 'Api Server Source',
    title: 'Api Server Source',
  },
  jira: {
    name: 'jira',
    iconUrl: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbm',
    displayName: 'Camel Source',
    title: 'Camel Source',
    data: {
      almdata: {
        apiVersion: 'sources.knative.dev/v1alpha1',
        kind: 'CamelSource',
        metadata: { name: 'jira' },
        spec: {},
      },
    },
  },
};

export const camelCsvData: ClusterServiceVersionKind[] = [
  {
    apiVersion: 'operators.coreos.com/v1alpha1',
    kind: 'ClusterServiceVersion',
    metadata: {
      annotations: {
        certified: 'false',
        repository: 'https://github.com/knative/eventing-sources',
        support: 'Camel',
        'alm-examples':
          '[\n  {\n    "apiVersion": "sources.knative.dev/v1alpha1",\n    "kind": "CamelSource",\n    "metadata": {\n      "name": "camel-timer-source"\n    },\n    "spec": {\n      "source": {\n        "flow": {\n          "from": {\n            "uri": "timer:tick?period=3000",\n            "steps": [\n              {\n                "set-body": {\n                  "constant": "Hello World!"\n                }\n              }\n            ]\n          }\n        }\n      },\n      "sink": {\n        "ref": {\n          "apiVersion": "messaging.knative.dev/v1beta1",\n          "kind": "InMemoryChannel",\n          "name": "camel-test"\n        }\n      }\n    }\n  },\n  {"apiVersion": "sources.knative.dev/v1alpha1", "kind": "CamelSource", "metadata": {"name": "telegram", "labels": {"console.openshift.io/event-source": "true"}, "annotations": {"console.openshift.io/icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNDAgMjQwIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIuNjY3IiB4Mj0iLjQxNyIgeTE9Ii4xNjciIHkyPSIuNzUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzM3YWVlMiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzFlOTZjOCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iLjY2IiB4Mj0iLjg1MSIgeTE9Ii40MzciIHkyPSIuODAyIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNlZmY3ZmMiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48Y2lyY2xlIGN4PSIxMjAiIGN5PSIxMjAiIHI9IjEyMCIgZmlsbD0idXJsKCNhKSIvPjxwYXRoIGZpbGw9IiNjOGRhZWEiIGQ9Ik05OCAxNzVjLTMuODg4IDAtMy4yMjctMS40NjgtNC41NjgtNS4xN0w4MiAxMzIuMjA3IDE3MCA4MCIvPjxwYXRoIGZpbGw9IiNhOWM5ZGQiIGQ9Ik05OCAxNzVjMyAwIDQuMzI1LTEuMzcyIDYtM2wxNi0xNS41NTgtMTkuOTU4LTEyLjAzNSIvPjxwYXRoIGZpbGw9InVybCgjYikiIGQ9Ik0xMDAuMDQgMTQ0LjQxbDQ4LjM2IDM1LjcyOWM1LjUxOSAzLjA0NSA5LjUwMSAxLjQ2OCAxMC44NzYtNS4xMjNsMTkuNjg1LTkyLjc2M2MyLjAxNS04LjA4LTMuMDgtMTEuNzQ2LTguMzYtOS4zNDlsLTExNS41OSA0NC41NzFjLTcuODkgMy4xNjUtNy44NDMgNy41NjctMS40MzggOS41MjhsMjkuNjYzIDkuMjU5IDY4LjY3My00My4zMjVjMy4yNDItMS45NjYgNi4yMTgtLjkxIDMuNzc2IDEuMjU4Ii8+PC9zdmc+"}}, "spec": {"source": {"flow": {"from": {"uri": "telegram:bots", "parameters": {"authorizationToken": "<put-here-the-token-from-the-bot-father>"}, "steps": [{"marshal": {"json": {}}}, {"to": "log:info"}]}}, "integration": {"dependencies": ["camel:jackson"]}}, "sink": {"ref": {"apiVersion": "messaging.knative.dev/v1beta1", "kind": "InMemoryChannel", "name": "messages"}}}},\n  {"apiVersion": "sources.knative.dev/v1alpha1", "kind": "CamelSource", "metadata": {"name": "salesforce", "labels": {"console.openshift.io/event-source": "true"}, "annotations": {"console.openshift.io/icon": "data:image/svg+xml;base64, "}}, "spec": {"source": {"flow": {"from": {"uri": "salesforce:camelTestTopic", "parameters": {"notifyForFields": "ALL", "updateTopic": "true", "notifyForOperationCreate": "true", "notifyForOperationUpdate": "false", "notifyForOperationDelete": "false", "notifyForOperationUndelete": "false", "sObjectQuery": "SELECT Id, Name, Email, Phone FROM Contact"}, "steps": [{"to": "log:info"}]}}}, "sink": {"ref": {"apiVersion": "messaging.knative.dev/v1beta1", "kind": "InMemoryChannel", "name": "salesforce"}}}},\n  {"apiVersion":"sources.knative.dev/v1alpha1","kind":"CamelSource","metadata":{"name":"slack","labels":{"console.openshift.io/event-source":"true"},"annotations":{"console.openshift.io/icon":"data:image/svg+xml;base64,PD94bWwgdmVyc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zMi42LDM2LjEsNTYsMjguNWwwLjUtMC4yQzI2MS45LDQ5NC4xLDI3NC42LDQ2OSwyNjcsNDQ1Ljd6Ii8+PHJlY3QgY2xhc3M9InN0MTkiIGhlaWdodD0iODkuNCIgdHJhbnNmb3JtPSJtYXRyaXgoLTAuOTUxIDAuMzA5MSAtMC4zMDkxIC0wLjk1MSAzMzEuOTg5NiAzNDAuMjQ1KSIgd2lkdGg9Ijg5LjQiIHg9Ijk0LjQiIHk9IjE1MS43Ii8+PHJlY3QgY2xhc3M9InN0MjAiIGhlaWdodD0iODguOCIgdHJhbnNmb3JtPSJtYXRyaXgoMC45NTEgLTAuMzA5MSAwLjMwOTEgMC45NTEgLTEwNS43NDk4IDc5LjAzMDEpIiB3aWR0aD0iODkuNCIgeD0iMTUxLjgiIHk9IjMyOC44Ii8+PHJlY3QgY2xhc3M9InN0MjEiIGhlaWdodD0iODguOCIgdHJhbnNmb3JtPSJtYXRyaXgoMC45NTEgLTAuMzA5MSAwLjMwOTEgMC45NTEgLTc5LjMyNSAxMzAuODY4OSkiIHdpZHRoPSI4OC44IiB4PSIzMjguOSIgeT0iMjcxLjMiLz48L2c+PC9zdmc+"}},"spec":{"source":{"flow":{"from":{"uri":"slack:general","parameters":{"token":"{{slack.token}}"},"steps":[{"marshal":{"json":{}}},{"to":"log:info"}]}},"integration":{"configuration":[{"type":"secret","value":"slack"}],"dependencies":["camel:jackson"]}},"sink":{"ref":{"apiVersion":"messaging.knative.dev/v1beta1","kind":"InMemoryChannel","name":"slack"}}}},\n  {"apiVersion":"sources.knative.dev/v1alpha1","kind":"CamelSource","metadata":{"name":"aws-kinesis","labels":{"console.openshift.io/event-source":"true"},"annotations":{"console.openshift.io/icon":"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMzA4LjIzNDAxIj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{"uri":"aws-kinesis:stream","parameters":{"secretKey":"{{aws.kinesis.secretKey}}","accessKey":"{{aws.kinesis.accessKey}}","region":"{{aws.kinesis.region}}"},"steps":[{"marshal":{"json":{}}},{"to":"log:info"}]}},"integration":{"configuration":[{"type":"secret","value":"aws-kinesis"}],"dependencies":["camel:jackson","camel:camel-aws-kinesis","mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.10.4"]}},"sink":{"ref":{"apiVersion":"messaging.knative.dev/v1beta1","kind":"InMemoryChannel","name":"aws-kinesis"}}}},\n  {"apiVersion":"sources.knative.dev/v1alpha1","kind":"CamelSource","metadata":{"name":"jira","labels": {"console.openshift.io/event-source": "true"}, "annotations": {"console.openshift.io/icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjU2cHgiIGhlaWdodD0iMjU2cHgiIHZpZXdCb3g9IjAgMCAyNTYgMjU2IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIj4KICAgIDxkZWZzPgogICAgICAgIDxsaW5lYXJHcmFkaWVudCB4MT0iOTguMDMwODY3NSUiIHkxPSIwLjE2MDU5OTU3MiUiIHgyPSI1OC44ODc3MDYyJSIgeTI9IjQwLjc2NTUyNDYlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDUyQ0MiIG9mZnNldD0iMTglIj48L3N0b3A+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyNjg0RkYiIG9mZnNldD0iMTAwJSI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgPGxp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DExNi43Mjg4ODkgTDEzOC45ODY2NjcsMTE2LjcyODg4OSBMMTM4Ljk4NjY2NywxMzguNjY2NjY3IEMxMzkuMDI1OTA1LDE2OS4yOTE5MjMgMTYzLjg2MzYwNywxOTQuMDk3ODAzIDE5NC40ODg4ODksMTk0LjA5Nzc3OCBMMTk0LjQ4ODg4OSw3MS45Mjg4ODg5IEMxOTQuNDg4ODg5LDY2LjAzNzg1MTYgMTg5LjcxMzI2LDYxLjI2MjIyMjIgMTgzLjgyMjIyMiw2MS4yNjIyMjIyIFoiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMSkiPjwvcGF0aD4KCQkJCTxwYXRoIGQ9Ik0xMjIuOTUxMTExLDEyMi40ODg4ODkgTDAsMTIyLjQ4ODg4OSBDMy43NTM5MTM2MmUtMTUsMTUzLjE0MTkyIDI0Ljg0OTE5MTMsMTc3Ljk5MTExMSA1NS41MDIyMjIyLDE3Ny45OTExMTEgTDc4LjIyMjIyMjIsMTc3Ljk5MTExMSBMNzguMjIyMjIyMiwxOTkuODU3Nzc4IEM3OC4yNDE3NjcsMjMwLjQ1NTMyIDEwMy4wMjAyODUsMjU1LjI2NTY0NyAxMzMuNjE3Nzc4LDI1NS4zMjQ0NDQgTDEzMy42MTc3NzgsMTMzLjE1NTU1NiBDMTMzLjYxNzc3OCwxMjcuMjY0NTE4IDEyOC44NDIxNDgsMTIyLjQ4ODg4OSAxMjIuOTUxMTExLDEyMi40ODg4ODkgWiIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0yKSI+PC9wYXRoPgoJCTwvZz4KPC9zdmc+Cg=="}},"spec":{"source":{"integration":{"configuration":[{"type":"secret","value":"jira"}],"dependencies":["camel:jackson","mvn:org.apache.httpcomponents:httpclient:jar:4.5.12","mvn:com.atlassian.jira:jira-rest-java-client-core:jar:5.2.1","mvn:com.atlassian.jira:jira-rest-java-client-api:jar:5.2.1"]},"flow":{"from":{"uri":"jira:newIssues","parameters":{"jiraUrl":"{{jira.url}}","username":"{{jira.username}}","password":"{{jira.password}}","jql":"{{jira.jql}}","delay":"500"},"steps":[{"to":"log:received?showAll=true&multiline=true"},{"marshal":{"json":{"disable-features":"FAIL_ON_EMPTY_BEANS"}}}]}}},"sink":{"ref":{"apiVersion":"messaging.knative.dev/v1alpha1","kind":"InMemoryChannel","name":"jira"}}}}\n]',
        capabilities: 'Basic Install',
        'olm.operatorNamespace': 'openshift-operators',
        containerImage:
          'quay.io/openshift-knative/knative-eventing-sources-camel-source-controller:v0.15.0',
        createdAt: '2020-07-16T09:15:43+02:00',
        categories: 'Integration & Delivery',
        description:
          'The Knative Camel addon provides a collection of eventing sources from the popular integration framework Apache Camel.',
        'olm.operatorGroup': 'global-operators',
      },
      selfLink:
        '/apis/operators.coreos.com/v1alpha1/namespaces/my-app/clusterserviceversions/knative-camel-operator.v0.15.0-20200716091543',
      resourceVersion: '108547',
      name: 'knative-camel-operator.v0.15.0-20200716091543',
      uid: '700a45fe-1ebe-4432-a6a7-2c1ae4391a1d',
      creationTimestamp: '2020-07-16T15:18:52Z',
      generation: 1,
      namespace: 'my-app',
      labels: {
        'console.openshift.io/event-source-provider': 'true',
        'olm.api.c766370cb4da0c0c': 'required',
        'olm.api.cf25648aa5bc41fd': 'provided',
        'olm.copiedFrom': 'openshift-operators',
      },
    },
    spec: {
      install: {
        strategy: 'Deployment',
        spec: {
          permissions: [
            {
              serviceAccountName: '',
              rules: [{ apiGroups: [], resources: [], verbs: [] }],
            },
          ],
          deployments: [{ name: '', spec: {} }],
        },
      },
      installModes: [{ type: InstallModeType.InstallModeTypeAllNamespaces, supported: true }],
      customresourcedefinitions: {
        owned: [
          {
            description: 'Represents a Knative Source based on Apache Camel',
            displayName: 'Camel Source',
            kind: 'CamelSource',
            name: 'camelsources.sources.knative.dev',
            version: 'v1alpha1',
          },
        ],
        required: [
          {
            description: 'Represents a Camel K Integration',
            displayName: 'Camel K Integration',
            kind: 'Integration',
            name: 'integrations.camel.apache.org',
            version: 'v1',
          },
        ],
      },
      apiservicedefinitions: {},
      keywords: ['serverless', 'eventing', 'apache camel', 'camel k'],
      displayName: 'Knative Apache Camel Operator',
      provider: { name: 'Red Hat' },
      maturity: 'alpha',
      version: '0.15.0-20200716091543',
      minKubeVersion: '1.11.0',
      links: [
        { name: 'Knative Eventing Contrib', url: 'https://github.com/knative/eventing-contrib' },
        { name: 'Documentation', url: 'https://www.knative.dev/docs/' },
      ],
      maintainers: [{ email: 'knative@redhat.com', name: 'Knative Team' }],
      description:
        'The Knative Camel addon provides a collection of eventing sources from the popular integration framework [Apache Camel](http://camel.apache.org/).\nSources are based on [Camel K integrations](https://github.com/apache/camel-k), a subproject of Apache Camel for running integration code in the cloud.\n\nFor documentation on using Knative Camel Sources, see the\n[Camel Source section](https://knative.dev/docs/eventing/samples/apache-camel-source/) of the\n[Knative documentation site](https://www.knative.dev/docs).\n\nThe operator requires Camel K 1.0.0 to be installed in any namespace where you want to run Camel eventing sources. Please, refer to the\n[Camel K documentation](https://github.com/apache/camel-k) for installation instructions.\n\nKnative Serving and Eventing are also required for installing this operator.\n',
      selector: { matchLabels: { name: 'knative-camel' } },
      labels: { name: 'knative-camel' },
    },
  },
];
export const getDefaultChannelData = (ref: string): AddChannelFormData => {
  const kind = getChannelKind(ref);
  return {
    application: {
      initial: 'app-group-one',
      name: 'app-group-one',
      selectedKey: 'app-group-one',
    },
    name: '',
    namespace: 'channel-ns',
    apiVersion: '',
    type: ref,
    data: {
      [kind.toLowerCase()]: getChannelData(getChannelKind(ref).toLowerCase()),
    },
    yamlData: '',
  };
};
