/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Component from '@glimmer/component';
/**
* @module AuthForm
* The `PkiPaginatedList` is used to handle a list page layout with lazyPagination response.
* It is specific to PKI so we can make certain assumptions about routing.
* The toolbar has no filtering since users can go directly to an item from the overview page.
*
* @example ```js
*
* <:list as |items|>
* {{#each items as |item}}
* for each thing
* {{/each}}
*
*
* ```
*/
interface Args {
list: unknown[];
listRoute: string;
hasConfig?: boolean;
}
export default class PkiPaginatedListComponent extends Component {
get paginationQueryParams() {
return (page: number) => ({ page });
}
get hasConfig() {
if (typeof this.args.hasConfig === 'boolean') return this.args.hasConfig;
return true;
}
}