'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-6377956f.js');

const EclPaginationItem = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.styleClass = '';
    this.theme = 'ec';
    this.path = undefined;
    this.ariaLabel = undefined;
    this.current = undefined;
    this.previous = undefined;
    this.next = undefined;
  }
  getClass() {
    const styleClasses = [
      `ecl-pagination__item`,
      `sc-ecl-pagination-${this.theme}`,
      this.styleClass
    ];
    if (this.current) {
      styleClasses.push('ecl-pagination__item--current');
    }
    if (this.previous) {
      styleClasses.push('ecl-pagination__item--previous');
    }
    if (this.next) {
      styleClasses.push('ecl-pagination__item--next');
    }
    return styleClasses.join(' ');
  }
  render() {
    return (index.h("li", { class: this.getClass() }, !this.current ?
      index.h("ecl-link", { variant: "standalone", path: this.path, "aria-label": this.ariaLabel }, index.h("slot", null), this.previous || this.next ?
        index.h("ecl-icon", { icon: "corner-arrow", size: "xs", theme: this.theme, transform: this.previous ? 'rotate-270' : 'rotate-90', slot: this.previous ? 'icon-before' : 'icon-after', "style-class": `sc-ecl-pagination-${this.theme}` }) : '') : '', this.current ?
      index.h("span", { class: `ecl-pagination__text ecl-pagination__text--summary sc-ecl-pagination-${this.theme}` }, index.h("slot", null)) : '', this.current ?
      index.h("span", { class: `ecl-pagination__text ecl-pagination__text--full sc-ecl-pagination-${this.theme}` }, this.ariaLabel) : ''));
  }
  ;
};

exports.ecl_pagination_item = EclPaginationItem;

//# sourceMappingURL=ecl-pagination-item.cjs.entry.js.map