import { r as registerInstance, h } from './index-0a3acb15.js';

const EclPaginationItem = class {
  constructor(hostRef) {
    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 (h("li", { class: this.getClass() }, !this.current ?
      h("ecl-link", { variant: "standalone", path: this.path, "aria-label": this.ariaLabel }, h("slot", null), this.previous || this.next ?
        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 ?
      h("span", { class: `ecl-pagination__text ecl-pagination__text--summary sc-ecl-pagination-${this.theme}` }, h("slot", null)) : '', this.current ?
      h("span", { class: `ecl-pagination__text ecl-pagination__text--full sc-ecl-pagination-${this.theme}` }, this.ariaLabel) : ''));
  }
  ;
};

export { EclPaginationItem as ecl_pagination_item };

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