import { customElement, html, LitElement, property } from "lit-element";
import { Table } from "./Table";
import { COMMON_STYLES } from "../../common/styles";
@customElement("pb-table-pagination")
export class TablePagination extends LitElement {
@property()
table?: Table;
static get styles() {
return [COMMON_STYLES];
}
previousHandler() {
if (!this.table?.data?.pagination.previous) {
console.debug("passbook/tables: no previous");
return;
}
this.table.page = this.table?.data?.pagination.previous;
}
nextHandler() {
if (!this.table?.data?.pagination.next) {
console.debug("passbook/tables: no next");
return;
}
this.table.page = this.table?.data?.pagination.next;
}
render() {
return html` `;
}
}