import { Component, h, Prop, Element, State } from '@stencil/core';
import { openWormhole } from 'stencil-wormhole';
export class ScCard {
  componentWillLoad() {
    this.handleSlotChange();
  }
  handleSlotChange() {
    this.hasTitleSlot = !!this.el.querySelector('[slot="title"]');
  }
  render() {
    return (h("div", { part: "base", class: {
        'card': true,
        'card--borderless': this.borderless,
        'card--no-padding': this.noPadding,
        // 'card--has-title-slot': this.hasTitleSlot,
      } },
      h("slot", null)));
  }
  static get is() { return "sc-card"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["sc-card.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["sc-card.css"]
  }; }
  static get properties() { return {
    "noDivider": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Eliminate the divider"
      },
      "attribute": "no-divider",
      "reflect": false
    },
    "borderless": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Is this card borderless."
      },
      "attribute": "borderless",
      "reflect": false
    },
    "noPadding": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Remove padding"
      },
      "attribute": "no-padding",
      "reflect": false
    },
    "loading": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Is this card loading."
      },
      "attribute": "loading",
      "reflect": false
    }
  }; }
  static get states() { return {
    "hasTitleSlot": {}
  }; }
  static get elementRef() { return "el"; }
}
openWormhole(ScCard, ['loading'], false);
