import { Component, Host, h, Prop, Event } from '@stencil/core';
export class UxplIconSelector {
  constructor() {
    this.active = false;
  }
  toggleActive(e) {
    this.active = !this.active;
    this.uxplActive.emit(this.active);
    this.clicked.emit();
    e.stopPropagation;
  }
  render() {
    return (h(Host, null,
      h("div", { class: {
          "selector-container": true,
          "active": this.active
        }, onClick: (e) => this.toggleActive(e) },
        h("div", { class: "selector-icons" },
          h("uxpl-icon", { size: "16px", icon: this.iconName, url: this.iconUrl, color: this.active ? '#FFFFFF' : this.iconColor }),
          h("uxpl-icon", { class: "selector-caret", size: "12px", icon: "pl-icon-caret-down", color: this.active ? '#FFFFFF' : this.iconColor })))));
  }
  static get is() { return "uxpl-icon-selector"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["uxpl-icon-selector.css"]
  }; }
  static get styleUrls() { return {
    "$": ["uxpl-icon-selector.css"]
  }; }
  static get properties() { return {
    "type": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "type",
      "reflect": false
    },
    "iconName": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "icon-name",
      "reflect": false
    },
    "iconUrl": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "icon-url",
      "reflect": false
    },
    "iconColor": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "icon-color",
      "reflect": false
    },
    "active": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "active",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
  static get events() { return [{
      "method": "clicked",
      "name": "clicked",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "uxplActive",
      "name": "uxplActive",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      }
    }]; }
}
