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

import { Component } from '@angular/core';
import { LinkOptions } from '@bci-web-core/core';

@Component({
  selector: 'bci-link-demo',
  templateUrl: 'link-demo.html',
  styleUrls: ['link-demo.scss'],
})
export class LinkDemoComponent {
  iconNames = [
    "bosch-ic-battery-2",
    "bosch-ic-arrow-right-down",
    "bosch-ic-arrow-circle-a",
    "bosch-ic-jewel",
    "bosch-ic-livechat",
    "bosch-ic-lock-open",
    "bosch-ic-scissors",
    "bosch-ic-standby",
    "bosch-ic-wand",
    "bosch-ic-ui",
    "bosch-ic-train",
    "bosch-ic-document-cv",
    "bosch-ic-hierarchy",
    "bosch-ic-lock-closed-checkmark",
    "bosch-ic-recording",
    "bosch-ic-filter-element-compensation",
    "bosch-ic-welding-laser",
    "bosch-ic-laser",
  ];
  iconPosition = false;
  linkOptions: LinkOptions = {
    url: 'https://brandguide.bosch.com/document/219/en#/components/link'
  }

  primaryLinkOptions: LinkOptions = {
    url: 'https://brandguide.bosch.com/document/219/en#/components/link',
    type: 'primary'
  }

  iconLinkOptions: LinkOptions = {
    url: 'https://brandguide.bosch.com/document/219/en#/components/link',
    type: 'labelIcon',
    iconName: 'bosch-ic-emoji-happy'
  }

  inlineLinkOptions: LinkOptions = {
    url: 'https://brandguide.bosch.com/document/219/en#/components/link',
    type: 'inline'
  }

  inlineLinkOptions2: LinkOptions = {
    url: 'https://brandguide.bosch.com/document/219/en#/components/link',
    type: 'inline',
    fontsize: 24
  }

  /**
   * randomly select an icon from the iconNames list
   */
  pickAnotherIcon() {
    this.iconLinkOptions.iconName = this.iconNames[Math.floor(this.iconNames.length * Math.random())];
  }


}
