import { h, Host } from '@stencil/core';
import { getHostAttrs } from '../../utils';
/**
 * Sets up the user profile block layout.
 */
export class BsProfileLayout {
  constructor() {
    /** Native attributes to pass through to the main element. */
    this.attrs = {};
    this.layout = 'vertical';
    this.href = undefined;
    this.passAttrs = '';
  }
  componentWillLoad() {
    this.attrs = getHostAttrs(this.hostEl, ['title', 'target', ...this.passAttrs.split(',')]);
  }
  render() {
    const TagName = this.href ? 'a' : 'div';
    return (h(Host, null, h(TagName, Object.assign({ href: this.href, class: "bs-profile", "data-layout": this.layout }, this.attrs), h("slot", null))));
  }
  static get is() { return "bs-profile-layout"; }
  static get originalStyleUrls() {
    return {
      "$": ["bs-profile-layout.scss"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["bs-profile-layout.css"]
    };
  }
  static get properties() {
    return {
      "layout": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "Orientation",
          "resolved": "\"horizontal\" | \"vertical\"",
          "references": {
            "Orientation": {
              "location": "import",
              "path": "../../types/propTypes"
            }
          }
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Change the orientation of the profile."
        },
        "attribute": "layout",
        "reflect": false,
        "defaultValue": "'vertical'"
      },
      "href": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Passing in a url changes the profile block to a link."
        },
        "attribute": "href",
        "reflect": false
      },
      "passAttrs": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "Any additional attributes (comma-separated) to pass through to the main element (<a> or <div>)."
        },
        "attribute": "pass-attrs",
        "reflect": false,
        "defaultValue": "''"
      }
    };
  }
  static get elementRef() { return "hostEl"; }
}
//# sourceMappingURL=bs-profile-layout.js.map
