import { Component, Prop, h } from '@stencil/core';
import { BreadcrumbVariants, } from '../../types/BreadcrumbVariants';
export class TeliaBreadcrumbs {
  constructor() {
    /** Variant */
    this.variant = BreadcrumbVariants.DESKTOP;
    /** Set the number of breadcrum items show on "mobile" variant */
    this.numberOfItemsShownOnMobile = 2;
    /** Home icon toggle, only considered on "desktop" variant */
    this.disableHomeIcon = false;
    /**
     * When used on a dark background, set this property to true.
     * This will adjust the styling of the "Home icon" if used.
     */
    this.darkBackground = false;
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-breadcrumbs';
    this.classname = 'telia-breadcrumbs';
    this.renderHomeIcon = () => {
      return (h("li", { class: `${this.classname}__home-icon` },
        h("telia-icon", { name: "home", size: "sm" })));
    };
  }
  render() {
    const classes = {
      [this.classname]: true,
      [`${this.classname}--${this.variant}`]: !!this.variant,
      [`${this.classname}--dark-background`]: this.darkBackground,
    };
    return (h("nav", { class: classes, "aria-label": this.ariaLabel, "data-testid": this.dataTestid, "data-mobile-items": this.numberOfItemsShownOnMobile },
      h("ol", { class: `${this.classname}__breadcrumbs` },
        this.variant === BreadcrumbVariants.DESKTOP &&
          !this.disableHomeIcon &&
          this.renderHomeIcon(),
        h("slot", null)),
      h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
  static get is() { return "telia-breadcrumbs"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["telia-breadcrumbs.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["telia-breadcrumbs.css"]
  }; }
  static get properties() { return {
    "variant": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "BreadcrumbVariantsType",
        "resolved": "\"desktop\" | \"mobile\"",
        "references": {
          "BreadcrumbVariantsType": {
            "location": "import",
            "path": "../../types/BreadcrumbVariants"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Variant"
      },
      "attribute": "variant",
      "reflect": false,
      "defaultValue": "BreadcrumbVariants.DESKTOP"
    },
    "numberOfItemsShownOnMobile": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "MobileItemsShownType",
        "resolved": "2 | 3",
        "references": {
          "MobileItemsShownType": {
            "location": "import",
            "path": "../../types/BreadcrumbVariants"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Set the number of breadcrum items show on \"mobile\" variant"
      },
      "attribute": "number-of-items-shown-on-mobile",
      "reflect": false,
      "defaultValue": "2"
    },
    "disableHomeIcon": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Home icon toggle, only considered on \"desktop\" variant"
      },
      "attribute": "disable-home-icon",
      "reflect": false,
      "defaultValue": "false"
    },
    "dataTestid": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Test id set for web component host"
      },
      "attribute": "data-testid",
      "reflect": false
    },
    "ariaLabel": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Accessibility: aria-label for the component"
      },
      "attribute": "aria-label",
      "reflect": false
    },
    "darkBackground": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "When used on a dark background, set this property to true.\nThis will adjust the styling of the \"Home icon\" if used."
      },
      "attribute": "dark-background",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
}
