import { h, Host } from '@stencil/core';
/**
 * @slot default - the "label" for the page item would go here (a page number, a next icon, etc.)
 */
export class BsPageItem {
  constructor() {
    this.size = undefined;
    this.active = false;
    this.disabled = false;
    this.href = undefined;
    this.activeLabel = '(current)';
  }
  /**
   * renders the page item
   */
  render() {
    return (h(Host, { class: `
                    page-item 
                    ${this.size ? `page-item-${this.size}` : ''}
                    ${this.active ? 'active' : ''}
                    ${this.disabled ? 'disabled' : ''}
                `, "aria-current": this.active ? 'page' : null }, this.active ? (h("span", { class: "page-link" }, h("slot", null), h("span", { class: "sr-only" }, this.activeLabel))) : (h("a", { class: "page-link", href: this.href || 'javascript:;' }, h("slot", null)))));
  }
  static get is() { return "bs-page-item"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["bs-page-item.scss"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["bs-page-item.css"]
    };
  }
  static get properties() {
    return {
      "size": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "'sm' | 'lg'",
          "resolved": "\"lg\" | \"sm\"",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "optional, size of the page item"
        },
        "attribute": "size",
        "reflect": false
      },
      "active": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "whether the item should be styled as active"
        },
        "attribute": "active",
        "reflect": false,
        "defaultValue": "false"
      },
      "disabled": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "whether the item should be disabled"
        },
        "attribute": "disabled",
        "reflect": false,
        "defaultValue": "false"
      },
      "href": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "the href for the item, if needed"
        },
        "attribute": "href",
        "reflect": false
      },
      "activeLabel": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": "An accessible label indicating the active state"
        },
        "attribute": "active-label",
        "reflect": false,
        "defaultValue": "'(current)'"
      }
    };
  }
}
//# sourceMappingURL=bs-page-item.js.map
