/*
 * Copyright (C) 2020 Robert Bosch GmbH Copyright (C) 2020 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { Component, ViewEncapsulation } from '@angular/core';
import { TreelistItem } from '@bci-web-core/web-components/dist/types/components/bci-treelist/treelist-Item.interface';

@Component({
  selector: 'bci-tree-demo',
  templateUrl: 'tree-demo.html',
  styleUrls: ['tree-demo.scss'],
  encapsulation: ViewEncapsulation.None,
  preserveWhitespaces: false,
})
export class TreeDemoComponent {
  treeSample = [
    {
      title: 'item 1',
      children: [
        {
          title: 'item 1.1',
        },
        {
          title: 'item 1.2',
        },
        {
          title: 'item 1.3',
        },
      ],
    },
    {
      title: 'item 2',
      children: [
        {
          title: 'item 2.1',
        },
        {
          title: 'item 2.2',
        },
        {
          title: 'item 2.3',
          children: [
            {
              title: 'item 2.3.1',
            },
            {
              title: 'item 2.3.2',
            },
          ],
        },
        {
          title: 'item 2.4',
        },
      ],
    },
    {
      title: 'item 3',
    },
    {
      title: 'item 4',
    },
  ];

  treeIconSample: TreelistItem[] = [
    {
      title: 'Arrows',
      children: [
        {
          title: 'Down',
          iconName: 'bosch-ic-arrow-down',
        },
        {
          title: 'Left',
          iconName: 'bosch-ic-arrow-left',
        },
        {
          title: 'Up',
          iconName: 'bosch-ic-arrow-up',
        },
        {
          title: 'Right',
          iconName: 'bosch-ic-arrow-right',
        },
      ],
    },
    {
      title: 'Alerts',
      children: [
        {
          title: 'Filled icons',
          children: [
            {
              title: 'Success',
              iconName: 'bosch-ic-alert-success-filled',
            },
            {
              title: 'Warning',
              iconName: 'bosch-ic-alert-warning-filled',
            },
            {
              title: 'Error',
              iconName: 'bosch-ic-alert-error-filled',
            },
          ],
        },
        {
          title: 'Success',
          iconName: 'bosch-ic-alert-success',
        },
        {
          title: 'Warning',
          iconName: 'bosch-ic-alert-warning',
        },
        {
          title: 'Error',
          iconName: 'bosch-ic-alert-error',
        },
      ],
    },
    {
      title: 'Emotions',
      children: [
        {
          title: 'Happy',
          iconName: 'bosch-ic-emoji-happy',
        },
        {
          title: 'Neutral',
          iconName: 'bosch-ic-emoji-neutral',
        },
        {
          title: 'Sad',
          iconName: 'bosch-ic-emoji-sad',
        },
      ],
    },
    {
      title: 'Social media',
      children: [
        {
          title: 'Facebook',
          iconName: 'bosch-ic-facebook-frame',
        },
        {
          title: 'Instagram',
          iconName: 'bosch-ic-instagram-frame',
        },
        {
          title: 'Linkedin',
          iconName: 'bosch-ic-linkedin-frame',
        },
      ],
    },
  ];
}
