import { FluentComponent } from '../core/fluent-component' import { createUniversalComponent } from '../core/component-factory' class FluentPaginationInternal extends FluentComponent { static tag = 'fluent-pagination' static override get observedAttributes() { return ['page', 'pages'] } render() { const page = Number(this.getAttribute('page') || '1') const pages = Number(this.getAttribute('pages') || '1') this.shadowRootRef.innerHTML = `
${page} / ${pages}
` } } export const FluentPagination = createUniversalComponent({ tag: 'fluent-pagination', class: FluentPaginationInternal }) if (typeof window !== 'undefined') { if (!customElements.get(FluentPaginationInternal.tag)) { customElements.define(FluentPaginationInternal.tag, FluentPaginationInternal) } }