var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { map } from 'lit/directives/map.js';
import { range } from 'lit/directives/range.js';
import { styles } from './style.js';
class WarpPageIndicator extends LitElement {
    constructor() {
        super(...arguments);
        /** Currently selected page (1-based index) */
        this.selectedPage = 1;
        /** Total number of pages */
        this.pageCount = 1;
    }
    static { this.styles = [styles]; }
    render() {
        return html `
      <div class="w-pageindicator">
        <div class="w-pageindicator--container">
          ${map(range(this.pageCount), (i) => {
            const isSelected = i === this.selectedPage - 1;
            const classes = {
                'w-pageindicator--dot': true,
                'w-pageindicator--selecteddot': isSelected,
            };
            return html `<div class="${classMap(classes)}"></div>`;
        })}
        </div>
      </div>
    `;
    }
}
__decorate([
    property({ type: Number, attribute: 'selected-page' })
], WarpPageIndicator.prototype, "selectedPage", void 0);
__decorate([
    property({ type: Number, attribute: 'page-count' })
], WarpPageIndicator.prototype, "pageCount", void 0);
if (!customElements.get('w-pageindicator')) {
    customElements.define('w-pageindicator', WarpPageIndicator);
}
export { WarpPageIndicator };
