import { Component, h, Prop } from '@stencil/core';
/**
 * @part base - The elements base wrapper.
 * @part container - The container.
 * @part icon__base - The icon base wrapper.
 */
export class ScCartIcon {
  constructor() {
    /** The icon to show. */
    this.icon = 'shopping-bag';
    /** The count to show in the cart icon. */
    this.count = 0;
  }
  render() {
    return (h("div", { class: { cart: true }, part: "base" },
      h("div", { class: "cart__container", part: "container" },
        h("div", { class: { cart__counter: true } }, this.count),
        h("slot", null,
          h("sc-icon", { exportparts: "base:icon__base", name: this.icon })))));
  }
  static get is() { return "sc-cart-icon"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["sc-cart-icon.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["sc-cart-icon.css"]
  }; }
  static get properties() { return {
    "icon": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "The icon to show."
      },
      "attribute": "icon",
      "reflect": false,
      "defaultValue": "'shopping-bag'"
    },
    "count": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "The count to show in the cart icon."
      },
      "attribute": "count",
      "reflect": false,
      "defaultValue": "0"
    }
  }; }
}
